0 Replies Latest reply on Oct 20, 2020 5:46 AM by FrSt_4749731

    Permanent Bonding Information and BLE Stack build issues

    FrSt_4749731

      We are using Upgradable OTA Stack mode with 3 projects (Launcher, BLE Stack, BLE application) on the CYBLE222014.

      1. When we build BLE Stack the image size is always around 128 kB. For debugging purposes I had to add
         Uart component and then the image size was bigger than 128kB:
        
        Flash used: 199237 of 262144 bytes (76,0%). Bootloader: 132352 bytes. Application: 66629 bytes.
        Metadata: 256 bytes. SRAM used: 16828 of 32768 bytes (51,4%). Stack: 1536 bytes. Heap: 9472 bytes.
       
        Strangely also FW update was working which is confusing me as from the Upgradable OTA documentation the
        256 kB Flash is split into 2 parts so that the BLE stack should be less or equal than 128kB. Am I correct?
        And if yes why does the PSoC Creator 4.2 not give any warning? Would there be enough space for later
        BLE stack updates (like going to new BLE standard version)?
       
      2. As I see Bonding information is stored in the section "Checksum exclude" which is deleted each time a
         FW OTA upgrade is performed.
         In the files "ota_mandatory.c/ota_optional.c" method "AfterImageUpdate()" I have disabled the clearing of
         the bonding information. And this is working fine for the BLE app, but saldy not for the BLE bootloader.
         I am still investigating why for the BLE bootloader this is not working.
         I assume this approach is ok as section "Checksum exclude" is in our control. Also from the documentation
         its stated that this section is not overwritten when we perform OTA FW upgrade.
         Why this approach is not working on the BLE bootloader? I have checked the Laucher and its clearing only the
         metadata section. Also the Loader in the BLE stack does not seems to do anything with this section.
        
         Just to mention that I am using CySmart for all this testing. Could the CySmart be involved in this?
        
         And another idea or question. For the moment we have separata BLE profiles and bonding information. Could
         I at first bonding with the BLE app copy the bonding information to the BLE stack section "Checksum exclude"?
         Can the BLE App access the BLE Stack section "Checksum exclude" or event better, can BLE App and BLE Stack
         use only one, the same section "Checksum exclude"?
        
      3. When performing the FW OTA update using the CySmart v1.3 on the Android mobile phone and using the option
         "Application and Stack Upgrade (Combined Files)" we have some problems
         to perform OTA FW update when the BLE FW image is build using the ARM GCC 5.4-2016-q2-update and
         Compiler->Optimization->Optimization Level set to Size or High. CySmart always responds with error:
         "Firmware update cancelled Error: CYRET_ERR_ROW"