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

Related