different sector different flash behavior (S32k144)

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

different sector different flash behavior (S32k144)

765 次查看
xyouman1
Contributor I

I'm working on writing to a flash sector using CAN and flash on the s32k144. I have written two different flash drivers at this point, one that writes 8 bytes at a time only if it is 8-byte-aligned; This can be tricky when sending 6 or 7 bytes via CAN at a time. Not terrible but not optimal.

More recently I wrote another flash driver to write an arbitrary number of bytes at any address. It aligns the data itself and writes in 8-byte chunks. In places where the data is not a full 8 bytes (the start or end of an unaligned set of bytes), the driver will read what is currently in flash to fill the 8 byte buffer before writing. This works fine when writing to the 0x5000 sector for example but not in 0x7F000. In the later sector I write 7 bytes at a time at 0x7F000, 0x7F007, and at 0x7F00E. When trying to write to 0x7F00E all 16 bytes from 0x7F000 to 0x7F010 get set to 0x00. Again, this behavior is not consistent everywhere; the same procedure works fine at 0x5000 but not at 0x7F000.

What makes these sectors behave differently?

标记 (2)
0 项奖励
回复
1 回复

741 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @xyouman1 

This is caused by ECC (Error Correction code):

lukaszadrapa_0-1747296017390.png

You are allowed to program only fully erased phrase.

Regards,

Lukas

 

0 项奖励
回复