MPC5675K - Software hanging on reading data flash sector

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

MPC5675K - Software hanging on reading data flash sector

跳至解决方案
2,033 次查看
mohammedshibin
Contributor I

Hai all,

My application is hanging while I am trying to read data flash sector 1(0x0080_4000) of MCU. All other sectors are working fine.

I have already performed around 10000 write cycle to sector 1. I am reading the sector using an 'unsigned long' pointer.

Please help me to identify the reason. Any help will be appreciated.

Thank you.

0 项奖励
回复
1 解答
1,798 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

It is caused by ECC error, most likely. Each word in data flash memory has hidden 7bit ECC syndrome. The ECC mechanism provides correction of single-bit faults and reporting of multiple-bit errors.

ECC error can occur if:

- erase or program operation is terminated by unexpected reset, so the flash is left in undefined state

- if we programmed word in data flash that is not fully erased (different from 0xFFFFFFFF)

- if we performed too many erase/program cycles (flash wear-out)

In case of single-bit fault, the ECC circuitry automatically corrects the data. In case of multiple-bit error, the flash controller returns bus error and exception is triggered. Take a look at this document and examples for details:

https://community.freescale.com/docs/DOC-103300

The solution is to erase whole flash block. Then it can be programmed and read again.

Regards,

Lukas

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,799 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

It is caused by ECC error, most likely. Each word in data flash memory has hidden 7bit ECC syndrome. The ECC mechanism provides correction of single-bit faults and reporting of multiple-bit errors.

ECC error can occur if:

- erase or program operation is terminated by unexpected reset, so the flash is left in undefined state

- if we programmed word in data flash that is not fully erased (different from 0xFFFFFFFF)

- if we performed too many erase/program cycles (flash wear-out)

In case of single-bit fault, the ECC circuitry automatically corrects the data. In case of multiple-bit error, the flash controller returns bus error and exception is triggered. Take a look at this document and examples for details:

https://community.freescale.com/docs/DOC-103300

The solution is to erase whole flash block. Then it can be programmed and read again.

Regards,

Lukas

0 项奖励
回复
1,798 次查看
mohammedshibin
Contributor I

Hi,

Same code is working fine in another board. What could be the reason for hanging in the other board?

0 项奖励
回复