MPC5675K - Software hanging on reading data flash sector

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

MPC5675K - Software hanging on reading data flash sector

Jump to solution
697 Views
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 Kudos
1 Solution
462 Views
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

View solution in original post

0 Kudos
2 Replies
463 Views
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 Kudos
462 Views
mohammedshibin
Contributor I

Hi,

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

0 Kudos