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

Getting an address as an error code on service discovery after update to SoftDevice 8

I just updated to SoftDevice 8 and now I'm getting the address 0x200023C4 in my apps error handler function. This error happens to be the start address for the ble_evt_buffer defined in softdevice handler. From looking at the terminal in MCP, it seems to be failing on reading CCCDs for my custom characteristics. If I change the order in which I initialize services then it fails on different characteristics, but always on a CCCD. It does successfully read some values from my custom services. I haven't changed any of my services after upgrading to softdevice 8. Looking at the release notes I thought it might have to do with the new variable size attribute table, but I set that the to default value which is what it should have been with the last softdevice (7.1) so I don't think that is the issue.

Any help would be greatly appreciated,

Seth

EDIT

This is definitely an issue with RAM, but I'm not sure what. When I change IRAM1 to 20002400 the error becomes 200027C4, and when IRAM1 is 20002600, the error is 200029C4. So the error is 0x3C4 greater than IRAM1. I tried changing the size of IRAM1 from 2000 to 2600, but got the original error of 200023C4.

EDIT#2

I just got the exact same error after advertising for a while, presumably when the advertising timed out and it tried to begin advertising again. My theory is that this is some issue with the ble event buffer as that is still the address that is being thrown as an error.

image description

image description

image description

image description

image description

image description

image description

Parents
  • You seem to have all SDK 8 components in place for softdevice 8, so that should be fine. You apparently have second revision nRF51822 chip.

    I am running SDK8+SD8 examples without problems with the same packs setup as you on the second revision chip with 16kB of RAM and do not experience anything abnormal. Your RAM and ROM settings in Keil are correct for your chip and SD 8.0.0.

    Are you able to run standard SDK examples from SDK 8.0.0? Are you using any malloc in your code? What is the stack and heap size you have in arm_startup_nrf51.s file? Just thinking you are using malloc without proper heap size for it. The RAM usage of your application does not seem to big, seems to be all right.

Reply
  • You seem to have all SDK 8 components in place for softdevice 8, so that should be fine. You apparently have second revision nRF51822 chip.

    I am running SDK8+SD8 examples without problems with the same packs setup as you on the second revision chip with 16kB of RAM and do not experience anything abnormal. Your RAM and ROM settings in Keil are correct for your chip and SD 8.0.0.

    Are you able to run standard SDK examples from SDK 8.0.0? Are you using any malloc in your code? What is the stack and heap size you have in arm_startup_nrf51.s file? Just thinking you are using malloc without proper heap size for it. The RAM usage of your application does not seem to big, seems to be all right.

Children
No Data
Related