This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hi champs,
In F28374D, my customer uses below C code to program OTP memory,
EALLOW; oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0); oReturnCheck = Fapi_enableBanksForOtpWrite(Fapi_FlashBank0); oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)Z1_OTP_PSWD_LOCK_ADDR, &i, 1, 0, 0, Fapi_AutoEccGeneration); while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy); EDIS;
However, there has no Fapi_enableBanksForOtpWrite() function in F28P65x Flash API. My question is that is Fapi_enableBanksForOtpWrite() necessary for OTP programming? Or we can use Fapi_setActiveFlashBank() function instead?
Thanks and regards,
Luke
Hi Luke,
You can use Fapi_setupBankSectorEnable( ); function. Refer flash API user guide "https://www.ti.com/lit/pdf/sprujb8" for more details.
Thanks & regards,
Rajeshwary
Hi Rajeshwary,
According to Flash API document, we should use below C code to disable User OTP Protection for DCSM programming, is it correct?
Fapi_setupBankSectorEnable(FLASH_WRAPPER_PROGRAM_BASE+ FLASH_O_CMDWEPROT_UO, 0xFFFFFFFE);
For User OTP, it looks like we use bit-0 to enable/disable protection, no matter which User OTP Bank we want to program, is it correct please?
Another question is that I cannot find these registers in TRM, where can I find the information about these registers please?
Regards,
Luke
HI Luke,
Yes that's correct, to enable/disable User OTP Protection for DCSM programming you should use below code no matter which User OTP Bank we want to program
Fapi_setupBankSectorEnable(FLASH_WRAPPER_PROGRAM_BASE+ FLASH_O_CMDWEPROT_UO, 0xFFFFFFFE);
Thanks & Regards,
Rajeshwary
Hi Rajeshwary,
Where can I get the register information please?
Regards,
Luke
Hi Luke,
You can get this information in Flash API user guide.
Regards,
Rajeshwary