Reading Kinetis K64 Internal Flash Causes HardFault

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

Reading Kinetis K64 Internal Flash Causes HardFault

Reading Kinetis K64 Internal Flash Causes HardFault

Symptoms

As we know: Flash must be programmed after an erase operation. Violation of this rule will cause programming fail and even hardfault(when AHB reading) on Kinetis K64 parts.

Customer accidently uses SDK’s API programming same sector twice(over-programming) without an erase operation. Then when perform AHB reading of this sector(include using JFLash to read this sector), an Hardfault occurs.

Diagnosis

K64 flash has internal ECC on each sector. When over-programming happens, ECC will be crushed and trigger Hardfault when AHB reading of this sector.

Solution

Using SDK API FLASH_VerifyErase to check if this sector is erased. Call FLASH_VerifyErase every time before you want to program the flash.

This problem will impact all Kinetis device which has FTFE flash module.

 

Thanks for Alex Yang provide the material.

无评分
版本历史
最后更新:
‎01-27-2021 05:54 AM
更新人: