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.