S32K3 flash (c40asf): is it possible to cross a 128 bytes boundary?

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

S32K3 flash (c40asf): is it possible to cross a 128 bytes boundary?

跳至解决方案
756 次查看
ferencvalenta
Contributor III

Description from the manual:

"A flash memory program sequence operates on any page within the flash core. Within a page, up to eight words may be altered in a single program operation. Also, up to four pages can be altered in a single program operation. Whenever the array is programmed, the ECC bits also get programmed."

Is there any constraint for the 4 pages to be programmed with one operation? I played a bit with the flash controller, and it seems that the DATA registers are always mapped to 128-byte pages in the memory. That is, it's not possible to program addresses that cross a 128-bytes boundary, because an address 128 bytes lower would be programmed. The lower 7 bits of PEADR_P do not seem to have any effect on what address is programmed, basically the offset of the DATA register is ORed to PEADR_P to yield the effective programming address.

Is that normal or am I doing something wrong? I did not find a description how do the DATA registers map to memory locations relative to PEADR_P. This is a sort of limitations, because 4-page program operations must be aligned to 128 bytes?

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

Hi @ferencvalenta,

Up to four pages (maximum 128-byte of the program data buffer) can be programmed at once on a quad-page boundary (aligned to 128 bytes as well).

This means the data to be written must fall within a quad-page, we have to split the write operation based on that boundary.

In RTD 3.0.0 (C40_Ip driver) and newer versions, there is this condition:

Address Offset + Length <= C40_DATA_SIZE_BYTES_U32 (128 Bytes).

If not met, the driver reports an error.

This condition is not present in older RTD versions, and this may cause issues.

 

Regards,

Daniel

在原帖中查看解决方案

1 回复
735 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ferencvalenta,

Up to four pages (maximum 128-byte of the program data buffer) can be programmed at once on a quad-page boundary (aligned to 128 bytes as well).

This means the data to be written must fall within a quad-page, we have to split the write operation based on that boundary.

In RTD 3.0.0 (C40_Ip driver) and newer versions, there is this condition:

Address Offset + Length <= C40_DATA_SIZE_BYTES_U32 (128 Bytes).

If not met, the driver reports an error.

This condition is not present in older RTD versions, and this may cause issues.

 

Regards,

Daniel