Unreadable 400Bytes of PFlash on S32k148

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

Unreadable 400Bytes of PFlash on S32k148

Jump to solution
557 Views
lwaszniowski
Contributor I

I have encountered the following problem on a device with S32k148. The program flash memory from 0x9000 do 0x918f (400Bytes) cannot be read (via J-link or GDB debugger) and software read access cause an exception.

History of the MCU is the following:

  1. Complete program flash memory was cleared and boot software was flashed via JTAG.
  2. The boot software was used to flash an application. Flash memory 0x9000 - 0xA000 is reserved for writing information by boot sw. Since it is already cleared, boot sw only additively writes to unused (cleared) memory cells by Flash Memory Module (FTFC) commands (FTFx_PROGRAM_PHRASE and FTFx_PROGRAM_CHECK).
  3. The application sw was changed several times, so several phrases were successfully written to memory 0x9000 - 0xA000.
  4. The device was used for few months in field tests without any problem.
  5. The device sopped response during new application flashing by the same process as in step 2, probably due to a write access to the 0x9000 - 0xA0000.

 

I have tried to read out the flash by J-link.

The range 0x00000000 - 0x00008FFF can be read and the content is correct (equal to written image).

The range 0x00009190 - 0x0017FFFF can be read and the content is correct.

Attempt to read any byte in the range 0x00009000 - 0x0000918F fails.

The problem is not caused by flash protection. The read flash configuration is:

lwaszniowski_0-1684215894064.png

 

I tried to attach debugger (VisualGDB connected via J-link) without flashing.

The debugger is also not able to display the suspicious memory range 0x00009000 - 0x0000918F:

lwaszniowski_1-1684215894183.png

During the software execution, an exception occurs at the first read access of the suspicious range.

lwaszniowski_2-1684215894231.png

 

I do not know which exception occurred since default handler DefaultISR is not redefined (default startup_S32k148.S from SDK is used).

 

I have not tried to clear the suspicious flash yet.

 

I would like to ask anybody to any hint how to further analyze this problem and how to prevent it in the future.

I have several questions:

  1. What is probably source of the problem?
  2. Is it correct approach to clear program flash during factory flashing and then write it phrase by phrase without clearing (even years after clearing)?
  3. Which exception can occur during flash access and how to handle them?
  4. Any suggestion how to prevent similar problems?

Thanks Libor Waszniowski

0 Kudos
Reply
1 Solution
525 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Libor,

As we have discussed via email, there is FERSTAT[DFDIF] = 0x2, uncorrectable ECC error and a precise bus fault because of it.

 

Regards,

Daniel

 

View solution in original post

0 Kudos
Reply
1 Reply
526 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello Libor,

As we have discussed via email, there is FERSTAT[DFDIF] = 0x2, uncorrectable ECC error and a precise bus fault because of it.

 

Regards,

Daniel

 

0 Kudos
Reply