How to Erase and write DFlash in s32k142

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

How to Erase and write DFlash in s32k142

256 Views
John_Zhuoo
Contributor I

When I use the S32k142 official Flash Demo, I use the Flash_Init() function to initialize Flash. I get DFlashSize 0. What is the reason?

* Temporary solution for FTFC and S32K144 CSEc part */
/* Get DEPART from Flash Configuration Register 1 */
DEPartitionCode = (uint8_t)((SIM->FCFG1 & SIM_FCFG1_DEPART_MASK) >> SIM_FCFG1_DEPART_SHIFT);

I get the DEPartitionCode to 8

 

John_Zhuoo_0-1712651155138.png

 

/* Get data flash size */
FLASH_DRV_GetDEPartitionCode(pSSDConfig, DEPartitionCode);

John_Zhuoo_1-1712651207216.png

 

and in this function , I get the pSSDConfig.DFlashSize to 0.

John_Zhuoo_2-1712651242670.png

 

Is there a mistake here? Thanks so much

0 Kudos
1 Reply

204 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@John_Zhuoo

I see no problem with your picture provided.

The DEPART code is 1000(0x08) which means zero space reserved for D-Flash

Senlent_1-1713167647518.png

 

 

 

0 Kudos