What is the sequence to program the flexNVM regions of the new S32K118

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

What is the sequence to program the flexNVM regions of the new S32K118

Jump to solution
845 Views
MarioGt
Contributor II

I have written a driver to program a S32K118 device and now I can program the program flash, but when I write to the FlexNVm address (0x1000000) as I program the program flash, I get an error while reading FTFE_FSTAT .

Can someone tell me what is the sequence to program flexNVM? (used like flsh)

0 Kudos
1 Solution
800 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@MarioGt

Senlent_0-1687946108150.png

D-Flash->0x1000_2000

FCCOB[1] = 0x80

FCCOB[2] = 0x20

FCCOB[3] = 0x00

View solution in original post

0 Kudos
7 Replies
811 Views
MarioGt
Contributor II

Hi,
Thanks your information, it's usefull.

How do I program the D-flash area once I have partitioned it?
Because the "Program Phrase" and "Program section" commands can only program 24-bit addresses, and the address of D-Flash starts from 0x10000000, which requires a 32-bit address.

Thanks
Mario

Tags (2)
0 Kudos
801 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@MarioGt

Senlent_0-1687946108150.png

D-Flash->0x1000_2000

FCCOB[1] = 0x80

FCCOB[2] = 0x20

FCCOB[3] = 0x00

0 Kudos
767 Views
MarioGt
Contributor II

Hi

now i can program the area of flexNVM but except the first 0x800 addresses

do you know why?

I discovered that 0x800 is the size of flexRAM and I always find "0x33CC6699F0F055AA" at the first address of FlexNVM (0x10000000) can this information be useful?

 

Thanks
Mario

0 Kudos
756 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@MarioGt

I haven't encountered a similar problem. In theory, there should be no data. Maybe the device has been partitioned before.
I suggest that you perform a mass erase on the device first, then partition the device, and then try to read and write to the FlexNVM area.

0 Kudos
739 Views
MarioGt
Contributor II
Thanks you
I already understood why.
is my problem.
already solved
0 Kudos
752 Views
MarioGt
Contributor II

Hi 

I found an interesting pattern, in fact I can program the first sector of flexNVM.
But once I disconnect and reconnect the power, the first sector of FlexNVM is automatically modified to the value "0x33CC6699F0F055AA" and "0xFF..."

it's wired.

Do you have any thoughts on this?

Thank
Mario

 

/*********************************************************************************/

Thanks you
I already understood why.
is my problem.
already solved

/*******************************************************************************//

0 Kudos
825 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@MarioGt

If you need to use the 32kb space of flexnvm as D-Flash, you need to partition it first.

you can refer to AN11983

https://www.nxp.com/docs/en/application-note/AN11983.pdf 

0 Kudos