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

RAM error for experimental ble_app_hrs_nfc_pairing example

Hello!

I am trying to run the experimental ble_app_hrs_nfc_pairing example from SDK17.

I am using an nRF52832 module and SoftDevice s132. 

The example compiles fine and loads onto the board but then it gets stuck while setting up the ble stack. 

I traced the error to this function.

 

It enters the if statement indicating that there wasn't enough RAM allocated to the softdevice. It then indicates what to change the values to in order for it to be sufficient. Those values are shown in the image above as watches. 

I set the RAM_START to the suggested value as is suggested in other blog posts. But it does not change this problem unfortunately. I have been loading the softdevice using nRFgoStudio, by selecting the hex file I downloaded for softdevice s132nrf52701.

Since it's related to the RAM of the softdevice I'm fairly sure that there should be a way to adjust that address and have this work. There is still plenty of available RAM on the board to use, I think I'm just overwriting an address somewhere. 

My question is how to go about getting the softdevice RAM sector address where I would like it to be so I don't error out anymore. Any help would be appreciated! 

Parents
  • Can you make sure to build with DEBUG and set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0 in sdk_config.h and double check what the ram start and size are?

  • I built with Debug and set NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED to 0 in sdk_config.h and continued to see the same behavior.

    When I go to look for the ram start and size I have been looking under the Common configuration > Code > Linker > Section Placement Macros. See below for how that looks on my screen. 

    When I expand this field it shows the following:

    Is that what you were asking for?

  • this is the correct way of setting the ram start and size yes.

    I just notice it seems you are not using debug terminal, but instead you have set breakpoints in the assert handler. If you instead change the following in sdk_config.h:

    NRF_LOG_BACKEND_RTT_ENABLED 1
    NRF_LOG_BACKEND_UART_ENABLED 0
    NRF_FPRINTF_FLAG_AUTOMATIC_CR_ON_LF_ENABLED 0

    Then you should get the information you want in the debug terminal directly, as shown below:

    I am using the same SES version as you v4.52c, there are not errors with me unless I on purpose change the ram start and size to something like:

    RAM_START=0x20002000
    RAM_SIZE=0xE000

    Then it will assert and output as shown in the debug terminal window.

  • This helped! It seems that the Error was resolved by changing it to the values listed in the Debug Terminal rather than trying to use the ones I was seeing before. I'm not sure why the values were different. 

    I have a new error now however. Should I create a new ticket for this?

Reply Children
No Data
Related