Hello,
tried to ask also this via emai 23.5, no answers.
Test type FLASH_ADDRESS_ECC_FAULT_INJECT:
Should generate ESM_G3ERR_FMC_UNCORR error
- This does generate any fault, see code lines 1240-1246 the actual fault generation is behind if which excludes fault-inject tests
#if defined(_TMS570LS31x_) || defined(_TMS570LS12x_) || defined(_RM48x_) || defined(_RM46x_) || defined(_RM42x_) || defined(_TMS570LS04x_)
if ((FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT != testType)&&(FLASH_ADDRESS_ECC_FAULT_INJECT != testType))
#endif
#if defined(_TMS570LC43x_) || defined(_RM57Lx_)
if (FLASH_ECC_TEST_MODE_2BIT == testType)
#endif
{
So the end result is that some registers are back upped & altered but not returned (since return is behind the same if).
regBkupFparOvr = sl_flashWREG->FPAROVR;
sl_flashWREG->FPAROVR |= F021F_FPAROVR_SYN_ADDRESS_ECC;
à The if sentence should exclude to restoring that backupped value
Data_abort nor error pin action is not generated either… So this test does not test anything???
So basically by running this test your sl_flashWREG->FPAROVR register value is corrupted and that’s it – this cannot be the point of this test…
==========================
Test type FLASH_ADDRESS_PARITY_FAULT_INJECT:
Code is not capable of returning from esm_high interrupt sl_esm_high_intr_handler(), same problems as in FLASH_ADDRESS_PARITY_SELF_TEST
https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/602737
Looks like SafeTI ESM handler code sets sl_flashWREG->FPAROVR = 0x5400U; in if regular test (FLASH_ADDRESS_PARITY_SELF_TEST)
Trying to set that in esm_application_callback but that does not help – should this be set and if yes, then why SafeTI esm handler didn’t do it for this test type also? In case the return to SafeTI-test code would work it would then restore the backup (well actually not, see below) but for the non-fault-injection test it does it so is that magic number 0x5400 actually needed in interrupt at all or should it somehow remove the error generation and thus being mandatory to do in ISR…
Also these are behind if(FLASH_ADDRESS_PARITY_FAULT_INJECT != testType)
/* Clear the diag mode settings */
sl_flashWREG->FPAROVR = regBkupFparOvr;
sl_flashWREG->FDIAGCTRL = regBckupFdiagctrl;
Resulting that register are corrupted after returning SafeTI in case the test would otherwise work…
The if sentence should exclude those now the register values are corrupted after returning from SafeTI code
==========================
Test type FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT:
exactly similar problems as in FLASH_ADDRESS_ECC_FAULT_INJECT since same guards present
==========================
So managed to run following tests in runtime (all 5 normal non-fault-injection-tests work in start up phase when FIQ is not enabled)
FLASH_ECC_TEST_MODE_1BIT
FLASH_ECC_TEST_MODE_2BIT
FLASH_ECC_ADDR_TAG_REG_MODE
FLASH_ADDRESS_ECC_SELF_TEST
But cannot run:
FLASH_ADDRESS_PARITY_SELF_TEST
FLASH_ADDRESS_ECC_FAULT_INJECT
FLASH_ADDRESS_PARITY_FAULT_INJECT
FLASH_ECC_TEST_MODE_2BIT_FAULT_INJECT
================================