S32K312 Flash Erase & Write casuing Hard fault randomly

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

S32K312 Flash Erase & Write casuing Hard fault randomly

328 Views
sarathkc351
Contributor I

I am currently working on developing a bootloader for S32k312. I have successfully configured the Flash Memory (FLS), and the flashing process is functioning as expected, with data being written to the intended flas memory locations. However, I've encountered occasional hard fault exceptions during Erase/Write operations. The flash drivers are located within the flash itself. Could this placement potentially be causing the issue? I am attempting to program a sector that does not contain boot code

0 Kudos
1 Reply

289 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @sarathkc351,

Please help me looking into this community post:

The below API functions have to be placed into SRAM (".ramcode" section), as show below.

  • C40_Ip_MainInterfaceSectorErase
  • C40_Ip_MainInterfaceSectorEraseStatus
  • C40_Ip_MainInterfaceWrite
  • C40_Ip_MainInterfaceWriteStatus

Then, the core must not access the block from interrupts. The interrupts must be either masked (PRIMASK = 1), or the vector table as well as the ISR() functions and the data the ISR() access must not be in the block.

I hope you find this helpful.

Best regards,
Julián.

0 Kudos