Failure access to internal flash when enabling Soft device

Good day Nordic people, 
I am facing a problem when erasing or writing to internal flash memory after enabling softdevice. here the details and tests:

Setup:
- GCC, arm toolchain, make files under linux OS. Visual studio code for editing.

Exact problem:
- when trying to erase or write to internal flash, it throw an exception at PC address 0x15074. sure this after SD enable.

Testing and Tries:
- Am using SD flash APIs.
- I tried to access sd flash function directly and within fstorage APIs.
- I tried Segger Fstorage example and it was working fine so i moved this example to my setup but no luck.
- i tried to disable softdevice before Flash operation and enable after finishing, it is working sometimes... in all cases i don't recommend this way of solving this problem.
- before enabling softdevice, I was able to master flash operation without any problem.
- I tried many configuration for sofdevice lf_clock, RC, XTAL and SYNTH

I think, there is a missed configuration is done by IDE like Segger, I didn't use it. But what is this configuration, i don't know.

best regards
Hossam

Parents Reply Children
  • Hi, 
    Partially, I solved this problem and i am planning to post it here, may help some body else.
    Now I have internal error event when doing flash operation inside interrupt function like GPIO handler?.
    I am using interrupt sdh dispatch model , I tried appsch_SDH_dispatch and got the same result.

    BTW, return code is NRF_SUCCESS, so function call is fine 

    I think it is because GPIO handler is calling SVC by calling SD operation, so is there any way to work around without making a lot of changes?
    regards

Related