How to Erase and write DFlash in s32k142

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

How to Erase and write DFlash in s32k142

513 次查看
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 项奖励
回复
1 回复

461 次查看
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 项奖励
回复