Unreadable 400Bytes of PFlash on S32k148

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unreadable 400Bytes of PFlash on S32k148

ソリューションへジャンプ
555件の閲覧回数
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 件の賞賛
返信
1 解決策
523件の閲覧回数
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 件の賞賛
返信
1 返信
524件の閲覧回数
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 件の賞賛
返信