Hi,
I try to do a startup test for the Flash ECC mechanism, and the FDFD is used.
And, when I inject an error, the FERSTAT is set but no hard fault results.
my code is like this:
/* enable Flash double bit fault to detect interrupt */
FTFC->FERCNFG = FTFC_FERCNFG_DFDIE(1);
/* force double bit fault detect */
FTFC->FERCNFG |= FTFC_FERCNFG_FDFD(1);
/* Read-after_write */
(void)FTFC->FERCNFG;
/* load a number value from any flash cell. */
FusaStartup_ECCTstVar = 0x88888888;
/*====================================================================
For S32K11x, the non-correctable ECC error will result in a hand fault directly.
So, the below lines will never be reached if the function is good
====================================================================*/
/* clear force of double bit fault */
FTFC->FERCNFG &= ~FTFC_FERCNFG_FDFD_MASK;
FTFC->FERSTAT = FTFC_FERSTAT_DFDIF(1);
Could you please have a look? thanks!
Hi zhenxing_luo,
Please refer to the discussion in: S32K142 Flash Double ECC Error Behavior
Hope it helps.
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.
-------------------------------------------------------------------------------