S32K342 Flash module

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

S32K342 Flash module

Jump to solution
4,406 Views
qazx
Contributor III

I have example code for flash module.

How to check the flash module is working fine, I have checked in Physical address also its given random values in that memory. 

How to write ,read and erase on Flash memory?

I checked in flash registers also, I don't know which registers I need to look on it.
Can you give me the solution for this?

I attached the memory location pic also.

 

Tags (1)
0 Kudos
1 Solution
4,258 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @qazx 

attached are possible reasons. The first one is usually the source of issues.

Regards,

Lukas

View solution in original post

0 Kudos
7 Replies
4,065 Views
qazx
Contributor III

Hello @lukaszadrapa 

I have tried flashing only with internal sector flash , i cant  to do write operation .
In user manual some limitations is there for C40_internal flash.
How to do the write operation in flash.
I can able to read from memory , its showing default value FFFFFFFF. 

0 Kudos
4,372 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @qazx 

First step is to check the PEG flag:

lukaszadrapa_0-1675157145680.png

 

lukaszadrapa_1-1675157169819.png

Second step is to read the programmed data back from flash for confirmation it was programmed correctly. Notice that it may be necessary to invalidate the data cache if data cache is enabled and if previous data are already cached.

And two important notes:

1. User is allowed to program only fully erased double-word. Cumulative programming is not allowed.

lukaszadrapa_2-1675157354549.png

2. Read-while-write is supported only between read partitions / blocks. It is not possible to access a partition which is being programmed or erased. The code must be executed from another partition or from RAM.

lukaszadrapa_3-1675157572027.png

Regards,

Lukas

4,357 Views
qazx
Contributor III
PEG bit field is 0. What i have to change?
0 Kudos
4,343 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Well, what kind of example code do you have? Is that your own code or is that an example from RTD package? If it is from RTD - which one and which version of RTD? Is that original RTD example or modified one?

Regards,

Lukas

0 Kudos
4,329 Views
qazx
Contributor III
It"s a RTD package code.

package version is - SW32K3_RTD_4.4_2.0.0

Example code name - Fls_Example_S32K342.

Origional RTD example and i checked for internal sector only so i commanded the external sector code.
0 Kudos
4,314 Views
qazx
Contributor III

Hello @lukaszadrapa 

 

Can you share the detail, why the PEG register is not updating to 1.
PEG register value in 0 only not changing.

0 Kudos
4,259 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @qazx 

attached are possible reasons. The first one is usually the source of issues.

Regards,

Lukas

0 Kudos