s32k3 read DFLASH failed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k3 read DFLASH failed

Jump to solution
228 Views
ZMY666777
Contributor II

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.

ZMY666777_0-1726126803281.png

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!

 

0 Kudos
Reply
1 Solution
200 Views
ZMY666777
Contributor II

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.

View solution in original post

0 Kudos
Reply
1 Reply
201 Views
ZMY666777
Contributor II

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.

0 Kudos
Reply