error_code = nrf_sdh_ble_enable(&ram_start); APP_ERROR_CHECK(err_code);
recived error code 4
I am using nrf52840 for my application and use ble_app_template_pca10056_s140 for my project
and receives error code 4 for nrf_sdh_ble_enable
error_code = nrf_sdh_ble_enable(&ram_start); APP_ERROR_CHECK(err_code);
recived error code 4
I am using nrf52840 for my application and use ble_app_template_pca10056_s140 for my project
and receives error code 4 for nrf_sdh_ble_enable
Hello,
What does your log say when this happens? I would think that you need to adjust your memory sections, if you have changed something in the SoftDevice configuration since your last build.
Please make sure to have DEBUG defined in your preprocessor defines, like shown in the included image:
This will make your logger output a detailed error message whenever a non-NRF_SUCCESS error code is passed to an APP_ERROR_CHECK.
Best regards,
Karl
Please consider these two images
Please add the DEBUG define, and enable logging. This will output exactly what you need to change in your section placement macros.
Best regards,
Karl
Added the debug but got the same error
for
error_code = nrf_sdh_enable_request(); APP_ERROR_CHECK(err_code);
error_code = nrf_sdh_ble_enable(&ram_start); APP_ERROR_CHECK(err_code);
What does your log say exactly, when these error codes are returned?
Please share the full log with me, for both cases.
There is no way for me to provide you with the necessary changes to the section macros without these error messages, or without seeing your complete project.
Best regards,
Karl
00> <error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at /home/jay/work/nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_template/main.c:105
00>
00> PC at: 0x0002B9DD
00>
00> <error> app: End of error report
00> <error> app: ERROR 4 [NRF_ERROR_NO_MEM] at /home/jay/work/nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_template/main.c:118
00>
00> PC at: 0x0002BA1F
00>
00> <error> app: End of error report
00> <info> app_timer: RTC: initialized.
00>
00> <debug> nrf_sdh: State request: 0x00000000
00>
00> <debug> nrf_sdh: Notify observer 0x0003EB94 => ready
00>
00> <debug> nrf_sdh: State change: 0x00000000
00>
00> <debug> nrf_sdh: State change: 0x00000001
00>
00> <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
00>
00> <warning> nrf_sdh_ble: Change the RAM start location from 0x20002C60 to 0x20003F08.
00>
00> <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3C0F8.
00>
00> <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
00> <info> app_timer: RTC: initialized.
00>
00> <debug> nrf_sdh: State request: 0x00000000
00>
00> <debug> nrf_sdh: Notify observer 0x0003EB94 => ready
00>
00> <debug> nrf_sdh: State change: 0x00000000
00>
00> <debug> nrf_sdh: State change: 0x00000001
00>
00> <warning> nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice.
00>
00> <warning> nrf_sdh_ble: Change the RAM start location from 0x20002C60 to 0x20003F08.
00>
00> <warning> nrf_sdh_ble: Maximum RAM size for application is 0x3C0F8.
00>
00> <error> nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM.
Hi
I have changed the RAM_START to 0x20003F08
and both issue have been resolved
Thanks for help!!!
I believe I'm struggling with the exact same issue, how did you get the full log? I only receive the same logging as your previous message.