is it possible to copy data from flash to flash using fls_write ?

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

is it possible to copy data from flash to flash using fls_write ?

177 次查看
sobo
Contributor III

Hello,

I want to copy the data store in code flash to another place  in code flash , is it possible or do I need to copy data in ram before ?

Fls_Write(AREA_1_LOGICAL_ADDR, (const uint8_t *)AREA_2_LOGICAL_ADDR, AREA_SIZE);

with AREA_1_LOGICAL_ADDR = 0x0 
AREA_2_LOGICAL_ADDR = 0x100000
AREA_2_LOGICAL_ADDR = 0x10000

Flash configuration ok and done with EB tresos.

Sophie
S32K3 

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

142 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @sobo 

S32K3 devices support the “Read-While-Write” (RWW) feature, which allows simultaneous read and write operations, but only when these operations occur in different flash blocks.

Direct flash memory access via pointers is not supported. Flash memory requires specific sequences for reading, writing, and erasing, which are managed by the PFlash controller. This controller enforces alignment rules and includes protection mechanisms that prevent direct access to the regions. Therefore, flash operations must be performed using the corresponding APIs, rather than raw pointer dereferencing.

 

BR, VaneB

0 项奖励
回复