Hello, I tried to use Mem_43_InFls module in S32K311, I write test code to test the api of the module , and find that I can write and erase the DFLASH(0X10000000-0X1000FFFF) successfully, but when I try to read the data in DFLASH(such as the data in 0X10000000), the program will shut down.
test code are shown above. I first use write api and can successfully write dflash. and I set readflag to 1 manually. And will fail to read dflash. after debug, I find the program will shut down when run '(*((uint8 *)(0x10000000)))'. I can read other address such as PFLASH. So I wonder what kind of reason will cause this problem.
Thanks!
Solved! Go to Solution.
The problem is solved. The reason is that in my program the dflash is been protected by MPU. after disabling MPU the dflash can be read.
The problem is solved. The reason is that in my program the dflash is been protected by MPU. after disabling MPU the dflash can be read.