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

Accessing entire 256KB RAM with soft-device enabled.

I'm using an NRF52840 custom board along with FreeRTOS and soft-device S140 V6.0.

I want to access the complete 256KB of RAM for verification of RAM using a custom protocol.

So my requirement is that when the verification starts, nobody should modify the RAM other than the protocol.

What are the necessary steps to make this happen?

My assumption was, if I disable the interrupts, nobody will be able to modify the RAM during the verification including the soft-device. So I tried the following things.

Before enabling the soft-device, I tried accessing the complete RAM 2 bytes at a time by disabling the interrupts using '__disable_irq()' before the RAM access and enabling interrupts using '__enable_irq()'. Things worked fine in this case.

But when I tried the same after enabling the soft-device, the board hung at the first RAM access. i.e when accessing 0x20000000. This might be an expected behavior since soft-device is using those areas for its running, maybe. So as the next try, I first stopped the BLE advertising using 'sd_ble_gap_adv_stop( m_advertising.adv_handle )'  and then I disabled the soft-device using 'nrf_sdh_disable_request()' before the '__disable_irq()' and the RAM access. But then the board hung at '__enable_irq()'.

What am I doing wrong?

What is the correct procedure to do this?

Thanks.

Parents Reply
  • OK it's correct to say that you can't access the Softdevice RAM, however when it's disabled, the Softdevice RAM requirement is only 8 bytes so the OP should be able to test everything from 0x20000008 upwards, just not the first 8 bytes of RAM. That's per the S140 spec I just checked but I believe all the softdevice specs I've ever read say the same thing, disabled RAM requirements are just 8 bytes. 

Children
No Data
Related