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

NRF_BREAKPOINT_COND error due to filesystem page can't be garbage collected

My development enviorment:
SDK 15.0.0
nrf52810
Example: examples\ble_peripheral\ble_app_template\pca10040e
SES IDE

I am running above mentioned example without any changes. On runtime, I am getting NRF_BREAKPOINT_COND. On debugging I found out it's happening during flash data storage initialization. In pages_init(), during page scan, it returns fail response for garbage collection. See attachment for memory configuration.

Is it related to memory placement or configuration? Can you direct me to the possible root cause?

FI: I also tested "ble_peripheral\ble_app_template\pca10040" example with nrf52832 and it is working fine.

Parents
  • Hi.

    The most important thing is that the different elements you flash don't occupy eachothers space (The application must no be placed on the SoftDevice or on the Bootloader and vice versa).

    The following figure shows the default memory layout for nRF52 devices, where nRF52832 has a flash size of 512 kB and nRF52840 has a flash size of 1024 kB:

    You can check which values you should use by doing the following in your project:

    In SDK config, set the following definitions:

    #define NRF_SDH_BLE_LOG_ENABLED 1

    #define NRF_SDH_BLE_LOG_LEVEL 4

    #define NRF_LOG_BACKEND_RTT_ENABLED 1

    Build a Debug configuration of your project.

    In my example here, I adjusted the RAM_START to low and this is the output I get in the debug terminal:

    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20002110 to 0x200022B0.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3DD50.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\NordicSemi\nRF5_SDK_15.2.0_clean\examples\ble_peripheral\ble_app_blinky\main.c:476
    PC at: 0x0002D96B
    <error> app: End of error report
    

    As you see, this message tells me if I need to adjust my settings, so I do that and my project runs without any errors.

    I can also do the same for the FLASH.

    Here, I adjusted the FLASH_START from 0x26000 to 0x25000, which is in the SoftDevice, and i got the following error message in SES:

    Because the Application overlaps the SoftDevice now. If i was unsure on where to put the FLASH_START address, and lets say I now set it to 0x30000, the Application will not start.

    This is because the SoftDevice I use expects the Application to start at 0x26000 (for this particular SoftDevice). This can be found in the SoftDevice release notes.

    So, to conclude:

    The start address for flash is found in the SoftDevice release notes for each SoftDevice, and the Application must start at this address. RAM can be adjusted using the method mentioned above.

    Hope this helps you.

    Best regards.

    Andreas

Reply
  • Hi.

    The most important thing is that the different elements you flash don't occupy eachothers space (The application must no be placed on the SoftDevice or on the Bootloader and vice versa).

    The following figure shows the default memory layout for nRF52 devices, where nRF52832 has a flash size of 512 kB and nRF52840 has a flash size of 1024 kB:

    You can check which values you should use by doing the following in your project:

    In SDK config, set the following definitions:

    #define NRF_SDH_BLE_LOG_ENABLED 1

    #define NRF_SDH_BLE_LOG_LEVEL 4

    #define NRF_LOG_BACKEND_RTT_ENABLED 1

    Build a Debug configuration of your project.

    In my example here, I adjusted the RAM_START to low and this is the output I get in the debug terminal:

    <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
    <warning> nrf_sdh_ble: Change the RAM start location from 0x20002110 to 0x200022B0.
    <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3DD50.
    <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
    <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at C:\NordicSemi\nRF5_SDK_15.2.0_clean\examples\ble_peripheral\ble_app_blinky\main.c:476
    PC at: 0x0002D96B
    <error> app: End of error report
    

    As you see, this message tells me if I need to adjust my settings, so I do that and my project runs without any errors.

    I can also do the same for the FLASH.

    Here, I adjusted the FLASH_START from 0x26000 to 0x25000, which is in the SoftDevice, and i got the following error message in SES:

    Because the Application overlaps the SoftDevice now. If i was unsure on where to put the FLASH_START address, and lets say I now set it to 0x30000, the Application will not start.

    This is because the SoftDevice I use expects the Application to start at 0x26000 (for this particular SoftDevice). This can be found in the SoftDevice release notes.

    So, to conclude:

    The start address for flash is found in the SoftDevice release notes for each SoftDevice, and the Application must start at this address. RAM can be adjusted using the method mentioned above.

    Hope this helps you.

    Best regards.

    Andreas

Children
No Data
Related