S32K148 Flash Sector Erase

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

S32K148 Flash Sector Erase

625 Views
wanglijun
Contributor II

Dear,

I have a question about the S32K148 flash sector erase.

In Bootloader, the address is from 0x00000000-0x0000FFFF. When I erase a sector, the address must be after 0x80000. If the address is before, erase failed.

 

Can you help analysis?

Thank you!

0 Kudos
1 Reply

619 Views
Vijay_Arwapally
Contributor III

S32148 PFlash has 3 Banks each of 512KB.

Read/Write is possible between different banks but not on same bank.

0x80000 is where Bank0 ends and Bank1 start, since your bootloader is part of Bank0, you cannot erase content on Bank0 directly but you can on Bank1.

To erase on Bank0, you need to disable interrupts while the erase operation is inprogress, as you cannot execute/read while erasing/writing.

 

Hope that helps!

0 Kudos