Dear Supporters,
I use S32K 148 FlexNVM as a Data flash, the driver (MCAL )is generated by EB.
After severals time earse and write, I get a error(RDCOLERR).
Could you give me some help?
Hello Jianfeng Liu,
This is explained in the description of this flag.
During the programming / erasing FTFC operation on the DFlash block, there must be no other access to the block.
Please make sure that interrupt routines do not read the block, there is no DMA access to the block, etc.
BR, Daniel
Hi Daniel,
Thanks for your reply.
Before erase and write FlexNVM, I already disable interrupt, and no DMA to this block. But it still get FTFC RDCOLERR.
@TerryDuPower ,
Seems that you called Fls_MainFunction but not wait until the status back to IDLE before call for next time, could you try this way:
For every step to call command to Erase or Write Fls, you need to wait until the main function has done
Thanks for your support!
I tried wait MEMIF_IDLE before Fls_MainFunction(), but still get FTFC RDCOLERR.
while(MEMIF_IDLE != Fls_GetStatus())
{
Fls_MainFunction();
}
SO, how's about Erase function ? It's need to wait for Idle state also
@cuongnguyenphu Actually, I add both earse and write. It still get FTFC RDCOLERR.
Can you remove the line: for (idx =0; idx < (FBL_DATA_SIZE / FLS_WRITE_DOUBLE_WORD); idx++)
In my view, only 1 while loop is enough to write data to Fls sector, despite the data size of Data to be write into Fls.