This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf 52832 --NRF_ERROR_NO_MEM

When the bluetooth service function is initialized, sd_ble_uuid_vs_add() is called in the ble_dfu_buttonless_init() function in case of an out of memory error.In the ble_nus_init() function, call sd_ble_gatts_characteristic_add() to get a memory error.Which one, ble_dfu_buttonless_init() or ble_nus_init(), reports an out of memory error after the bluetooth service initializes the function.How to solve the problem of insufficient memory?

Parents
  • Hi,

     

    When the bluetooth service function is initialized, sd_ble_uuid_vs_add()

    This is likely related to your sdk_config.h::NRF_SDH_BLE_VS_UUID_COUNT. Try incrementing this define with 1.

    In the ble_nus_init() function, call sd_ble_gatts_characteristic_add() to get a memory error.Which one, ble_dfu_buttonless_init() or ble_nus_init(), reports an out of memory error after the bluetooth service initializes the function.How to solve the problem of insufficient memory?

    The softdevice needs a given amount of RAM to be able to add characteristics. Please see this blog post on how to adjust to match your application:

    https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/adjustment-of-ram-and-flash-memory 

     

    Kind regards,

    Håkon

  • The reason is found, because I need to use DFU service and NUS service, but the number of service ids I assigned to bluetooth is too small, resulting in the error of insufficient memory.I would like to ask if there are any books or materials about this kind, please send me the link. Thank you.

  • There are tutorials on BLE here on devzone, specifically this one regarding services:

    https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial

      

    xiaobai said:
    resulting in the error of insufficient memory

     The logger should print out the values you need to adjust to. in your IDE, you should be able then to change the start address in RAM, so that the SoftDevice is given the amount of memory it needs. The method of adjusting the RAM start address is different in gcc, keil, iar, and ses, so if you still have issues, please let me know what IDE you're using.

     

    Kind regards,

    Håkon

Reply Children
No Data