S32K324 DFlash exception causing BUS FAULT

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

S32K324 DFlash exception causing BUS FAULT

150 Views
zzt
Contributor I

Hello NXP Community and Experts,

I am encountering a persistent Bus Fault exception on S32K324 microcontroller, which seems to be triggered when accessing the DFlash memory.

Observations:

When debugging, BFSR and BFAR registers show a bus fault on access to address 0x1000a000. I obsecured that some abnormal behaviors happened in DFlash(At the beginning of one Fee bank)Some bytes of contents kept alternating between "????????" and "FFFFFFFF". Other flash banks operate normally. 

registers.pngdump.png

      Alternating between "????????" and "FFFFFFFFF"

What I have tried:

The same abnormal behavior persists whether the MCU is under set or stopped at breakpoint. 

Could you please point out the potential causes for a DFlash exception? Any suggestions or guidance would be greatly appreciated. Thank you in advance for your support!

#S32K3 

 

Tags (1)
0 Kudos
Reply
1 Reply

123 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @zzt 

If the debugger shows ???????? characters, such data are corrupted due to double bit ECC error.
Generally, ECC error can occur due to:
1. Overprogramming. ECC is handled on 64bit (one double word) boundary. Users are allowed to program only a double word which is in fully erased state. If the double word is not in erased state (all bytes are 0xFF), it's necessary to erase whole sector (8KB).
2. Program or erase operation is terminated by unexpected reset, so the flash is left in undeterministic state.
3. Flash wear-out - when too many program/erase cycles have been performed on the flash.

In your case, it's caused by (2), most likely. Please take a look at:
https://community.nxp.com/t5/S32K/S32K3-Hard-fault-exception-on-startup-for-ECC-error-in-DFlash/m-p/...

Regards,
Lukas

0 Kudos
Reply