s32k3 how to recover flash?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

s32k3 how to recover flash?

跳至解决方案
1,336 次查看
victory
Contributor V

Hi NXP,

    i'm working on boot application for updating app program.  when boot program pflash meet some error and trigger a swt reset mcu, then checking plash is partial unaccessible.  as pic below,

1. is this a flash ecc error case?

2. in that situation, jlink cant program the flash,   could you give some advice how to recover the plash to normal state?

PixPin_2024-10-10_11-20-22.png

标记 (1)
0 项奖励
回复
1 解答
1,259 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

The flash must be read first.

I would maybe focus on why the flashing gets stuck and why the MCU has to be reset by the WDOG.

The flash block that is being programmed must not be accessed by any master on the bus.

This might requires disabling interrupts or placing the flash driver into SRAM.

 

Regards,

Daniel

在原帖中查看解决方案

0 项奖励
回复
4 回复数
1,291 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

Can you specify the S32K3xx part number?

If the MCU is reset while the flash operation is in progress, the content of the flash cannot be defined, and ECC error should be expected.

If there is an uncorrectable ECC error detected during a read operation, the MCRS[ERR] flag is set.

The detection can be suppressed:

danielmartynek_0-1728559108296.png

 

Regards,

Daniel

0 项奖励
回复
1,273 次查看
victory
Contributor V
i am using s32k312
is there any method to detect the error without read the target flash region to get if that area has a ecc error and unaccessible?
0 项奖励
回复
1,260 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @victory,

The flash must be read first.

I would maybe focus on why the flashing gets stuck and why the MCU has to be reset by the WDOG.

The flash block that is being programmed must not be accessed by any master on the bus.

This might requires disabling interrupts or placing the flash driver into SRAM.

 

Regards,

Daniel

0 项奖励
回复
1,303 次查看
victory
Contributor V
Append:
is it possible to disable flash ecc function?
0 项奖励
回复