Programming data flash s32k3

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Programming data flash s32k3

ソリューションへジャンプ
2,773件の閲覧回数
vusal
Contributor III

This is from AN13388.

{
register tFLASH_STATUS status = FLASH_PEG_ST;
register uint8_t *pDst = (uint8_t*)dst, *pSrc = (uint8_t*)src, *pTmp;
register uint32_t *pData;
uint32_t tmp;
while ((nbytes > 0L) && (status & FLASH_PEG_ST))
{
pData = (uint32_t*)((uint32_t)&FLASH->DATA[0] + ((uint32_t)pDst & FLASH_DATAX_MASK));
FLASH_InitSeq (pDst);
do {
tmp = 0xffffffffUL;
pTmp = (uint8_t*)((uint32_t)&tmp + ((uint32_t)pDst & FLASH_BYTES_MASK));
do {
*pTmp++ = *pSrc++; pDst++;
} while ((nbytes-- > 0L) && ((uint32_t)pTmp & FLASH_BYTES_MASK));
*pData++ = tmp;
} while ((nbytes > 0L) && ((uint32_t)pData & FLASH_DATAX_MASK));
status = FLASH_ExecSeq (FLASH_MCR_PGM_MASK);
}
return


I couldn't find reference to FLASH_BYTES_MASK and FLASH_DATAX_MASK. Any thoughts?

Thanks!

0 件の賞賛
返信
1 解決策
2,753件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Sorry for the inconvenience we bring you! 
It seems to be the code in the flash_test project of S32K3xxDRV_r1.4.

FLASH_BYTES_MASK FLASH_DATAX_MASK.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

5 返答(返信)
2,754件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Sorry for the inconvenience we bring you! 
It seems to be the code in the flash_test project of S32K3xxDRV_r1.4.

FLASH_BYTES_MASK FLASH_DATAX_MASK.png


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

2,693件の閲覧回数
vusal
Contributor III

@Robin_Shen ,

Any chance flash_test project available online?

Thanks!

0 件の賞賛
返信
2,744件の閲覧回数
vusal
Contributor III

Hi @Robin_Shen,

Thank you very much for this. This answers my question.

One more thing, I couldn't find S32K3xxDRV_r1.4 example project in my IDE. Any thoughts?

Thanks!

0 件の賞賛
返信
2,726件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

This is internal bare metal drivers, which was done before RTD was decided. In case you want official ones, the RTD are only available.

2,703件の閲覧回数
vusal
Contributor III
Thank you!
0 件の賞賛
返信