This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Migration from SDK 5.2 to 6.0 and SD 6.0 to 7.0 issues

Hi,

I am migrating to the latest code versions (both SDK and Softdevice) but I am having issues when I start the notifications on a BLE app. The errors I am seeing are almost identical to what is seen here.

After notifications are enabled it transmits data as expected for about 1 second, then it crashes in the timeout_handler_exec() subroutine when m_evt_schedule_func() returns with error 4, No Memory for operation. I have tried increasing SCHED_QUEUE_SIZE from 30 (which worked before the migration) to 100. I have tried increasing APP_TIMER_OP_QUEUE_SIZE from 15 to 40, and I have tried increasing APP_TIMER_MAX_TIMERS from 6 to 10. None of these things, or a combination has any noticeable effect on when the scheduler queue fills up and throws the error.

I did leave the old SPI driver from the previous SDK in place when I migrated, because it was lightweight and worked just fine.

Any help or insight would be greatly appreciated.

Thanks,

Jeremy

EDIT:

I have since run 2 more tests with my setup.

  1. Using the old SDK (v5.2) with the new softdevice (v7), the exact same issue occurs. One characteristic gets notifications just fine, but as soon as the second characteristic transmits once it crashes inexplicably with no memory.

  2. Using the new SDK (v6.0) alongside the old softdevice (v6), the device works exactly as it is supposed to.

Is there something that needs to happen for the new softdevice to transmit notifications for multiple characteristics or is there some sort of memory leak due to the new softdevice?

Thanks

  • Hi Jeremy

    We do not provide any guide on how to port your code between major nRF51 SDK releases. The method that is generally used to port custom application between major nRF51 SDK releases is to copy the custom code, block by block, into a similar example in the new SDK. For example, if I had made a custom application based on the ble_app_hrs example, I would copy the custom code into the ble_app_hrs example in the new SDK.

    Also, SD 7.0.0 is only compatible with SDK 6.0.0 and SD 6.0.0 is only compatible with SDK 5.2.0

  • These resources may also help:

    1. <s110_nrf51822_7.0.0_releasenotes.pdf> and <s110_nrf51822_7.0.0_migration-document.pdf> in the s110_nrf51822_7.0.0.zip

    2. The chapter "Changes:" in <release_notes.txt> of SDK 6.0.0.

    Changes:

    - Added partial support for Keil 5 uvprojx files.
    
    ANT
        - None
        
    ANT + BLE (Dual stack)
    
    BLE
        - New module device manager replaces bond manager for storing persistent data
        - Experimental device manager support for s120 (BLE central)
        - S110 serialization solution has been reworked
            - 100% s110 BLE APIs are now serialized
        - S110 support for application concurrent multiprotocol radio access
        - Pstorage module: Added API for doing range updates 
        - Experimental: Device firmware upgrade now supports updating both softdevice and bootloader for s110
        
    Proprietary
        - Enhanced ShockBurst: Added nrf_esb_reuse_pid() function to API, giving "reuse payload" functionality.
        - Gazell: Added "suspend" mode enabling sharing of radio and PPI. 
        - Gazell: HW resources are released when Gazell is being disabled or entering suspend mode.
        - Gazell: HW resources are reconfigured when Gazell is being enabled or exiting from suspend mode.
    

    ps, these crossed my mind because of enlightenment from Stefan's help on one of my question. Thanks to Stefan.

  • Stefan,

    Is this truly the easiest way to do it? I was going to attempt to look through the release notes and migration document, but if you feel this is the best method I will proceed that way. Can you link me to the latest version of the ble_app_hrs example. I don't know where that is located.

  • My experience is that it is easier to copy custom code from SDK v5.2.0 into similar code template in version 6.0.0, than to actually try to port your code. This is mainly because the bond-manager in version 5.2.0 is replaced by the device-manager in version 6.0.0, see release notes for nRF51 SDK v6.0.0.

  • After copying the custom code into the ble_app_hrs example it started working as expected.

Related