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

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

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

158 Views
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 

Tags (2)
0 Kudos
Reply
1 Reply

123 Views
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 Kudos
Reply