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!
已解决! 转到解答。
Hi
Sorry for the inconvenience we bring you!
It seems to be the code in the flash_test project of S32K3xxDRV_r1.4.
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.
-------------------------------------------------------------------------------
Hi
Sorry for the inconvenience we bring you!
It seems to be the code in the flash_test project of S32K3xxDRV_r1.4.
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.
-------------------------------------------------------------------------------