custom_ble_service_example icon indicating copy to clipboard operation
custom_ble_service_example copied to clipboard

RAM Start & End Problem (S140)

Open ebachaalany opened this issue 4 years ago • 3 comments

Hello Bjorn, Thanks for this useful tutorial. We are working on an application with motion control based on nRF52840 (S140). I have implemented your example / tutorial and modified the RAM start 0x20002220 and the size to 0xDDE0 however I am still getting the FATAL ERROR message related to the memory allocation. Any thoughts about that? Thanks, Elias

ebachaalany avatar Oct 14 '20 07:10 ebachaalany

Can you check which RAM start address the sd_ble_enable call in nrf_sdh_ble_enable() i nrf_sdh_ble.c returns in the p_app_ram_start variable ?

You can also try to change the memory settings in the example to the following: FLASH_PH_START=0x0

FLASH_PH_SIZE=0x100000

RAM_PH_START=0x20000000

RAM_PH_SIZE=0x40000

FLASH_START=0x26000

FLASH_SIZE=0xda000

RAM_START=0x20002210

RAM_SIZE=0x3ddf0

bjornspock avatar Oct 22 '20 08:10 bjornspock

Hello Bjorn,

Regarding the p_app_ram_start value is 0x3DDA0

Below the ralted LOG: app_timer: RTC: initialized. nrf_sdh_ble: p_app_ram_start = 0x3DDA0. nrf_sdh_ble: Insufficient RAM allocated for the SoftDevice. nrf_sdh_ble: Change the RAM start location from 0x20002260 to 0x20002270. nrf_sdh_ble: Maximum RAM size for application is 0x3DD90. nrf_sdh_ble: sd_ble_enable() returned NRF_ERROR_NO_MEM. app: Fatal error app: System reset

As for the Memory settings provided, we received the following error while downloading:

Screenshot 2020-10-22 125928

I am using currently the 52840 DK and this is the link to the app based on your tutorial. (https://we.tl/t-KCOLFuXM65)

And this is the Case ID: 258138 at DEvZone

Thanks!

ebachaalany avatar Oct 22 '20 10:10 ebachaalany

This is late so you might have resolved this but I had a similar error, did you try the suggestion the log output? And did it work? nrf_sdh_ble: Change the RAM start location from 0x20002260 to 0x20002270.

I did this through the same linker setting we used to update RAM after defining a new vendor service and it worked for me.

rs872 avatar Dec 12 '20 20:12 rs872