Greetings;
I am having difficulty using the F021 API to write to the customer OTP section 0xF0000000 in order to lock a TMS570 device using the AJSM. We are using a TMS570LS1224 on our custom device (i.e. not a TI SDK) running FreeRTOS.
I am trying to write the four word (128-bit) hex string, let's say it's four lines of 0x44444444 (my actual security key is obviously different and mindful of the 1s and 0s of the visible key). I am setting privilege mode using prvRaisePrivilege().
I am using the following API calls:
uint32_t tempAjsm[4] = { 0x44444444, 0x44444444, 0x44444444, 0x44444444 };
fapi_status = Fapi_initializeFlashBanks( main_clock_mhz );
fapi_status = Fapi_enableBanksForOtpWrite(0xFFU);
fapi_status = Fapi_issueProgrammingCommand(
(uint32_t *)(0xF0000000),
(uint8_t *)((uint32_t)(&tempAjsm[0])),
16, NULL, 0, Fapi_AutoEccGeneration);
fapi_status = Fapi_disableBanksForOtpWrite();
In between each operation I am checking if (FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmReady) before proceeding.
All of the API calls come back Fapi_Status_Success, but the memory location at 0xF0000000 to 0xF000000C still shows the original "visible key" (0xEFFDFFFF etc.).
My assumption is that I'm doing something wrong, but per the documentation I can't determine what would still need to be done.
Do I need to call Fapi_setActiveFlashBank()? The enumerated type it takes in as a parameter only lists Fapi_FlashBank0 through Fapi_FlashBank7, none of the OTPs.
Thanks in advance,
Joe Shidle
joe.shidle@deltamobile.com