Other Parts Discussed in Thread: UNIFLASH
Hello,
I'm working on TMS320F28004x OTP programming. I have the following questions:
1. Since care must be taken while programming this area, I would like to double check the correct sequence that must be performed. I 'm using the following code:
_________________________________________________________________________
InitSysPll(INT_OSC2,IMULT_16,FMULT_0,PLLCLK_BY_2);
EALLOW;
err_code = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, 80);
if (err_code != Fapi_Status_Success)
{
return (err_code);
}
err_code = Fapi_setActiveFlashBank(Fapi_FlashBank0);
start_addr = 0x78008;
// data_buff initialization
...
err_code = Fapi_issueProgrammingCommand((uint32 *) start_addr, data_buff, 8, 0, 0, Fapi_AutoEccGeneration);
_________________________________________________________________________
However, the OTP ECC has not programmed correctly. The flash API is "F021 Flash API v1.55". Do I missed something?
Is "Fapi_AutoEccGeneration" the recommended mode for programming the OTP area? Or do I program OTP & OTP ECC separately? If so, how to do it?
2. Once programmed the OTP area, I'm not able to ignore ECC errors, which triggers NMI. I tried to write the ECC_ENABLE register to 0xB and perfom a system reset via JTAG but the issue still persist.
Uniflash tool is able to reprogram the device even if the OTP ECC is wrong.
How can be avoided NMI due to ECC error?
Best Regards,
Luca Zanuttini