Part Number: RM46L852
Tool/software: Code Composer Studio
Hi,
I am working with the TI RM46L852 device and I need a clarify how to program the OTP part of the flash memory. I program the flash memory and EEPROM using F021 Flash API, version 2.01.01. I can succesfull erase/program BANK0 flash(0x0 - 0x13_FFFF) and BANK7 EEPROM flash(0xF020_0000 - 0xF020FFFF). Now I study the possibilities of programming the OTP memory and I have some questions. I will be very grateful for answers to the next questions:
1. The device memory map table(6.9.2) in the datasheet illustrate that two OTP memory ranges are used. First, the TCM Flash Banks OTP is for Bank 0 and second for Bank 7. Am I right? Or there is only one OTP memory?
2. Does the picture above means, that TCM FLash Banks OTP sets the security rule for BANK0 flash and OTP Bank7 for EEPROM?
3. Is the OTP memory intend for general purpose or have some special meaning, i.e. some OTP memory bytes have special meaning? If yes, where can I find the description of the memory?
Next questions will belongs to the code developing in CCS:
4. The Reference guide for the F021 Flash API (spnu501G) talks about function Fapi_enableBanksForOtpWrite(uint8_t u8Banks). The "u8Banks" parameter indicate the bank to be enabled. So, does it means that for programming the TCM flash banks(0xF000_0000 to 0xF000_1FFF) is needes to use the u8Banks = 0x1(1 shl 0) and for Bank 7 OTP(0xF000_E000 to 0xF000_FFFF) the u8Banks = 0x80(1 shl 7)?
5. Is this the following algo steps for programming the whole OTP TCM flash banks(0xF000_0000 to 0xF000_1FFF) right? Algo:
oReturnCheck = Fapi_initializeFlashBanks(220);
if(oReturnCheck != Fapi_Status_Success) {
break;
}
oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
if(oReturnCheck != Fapi_Status_Success) {
break;
}
oReturnCheck = Fapi_enableBanksForOtpWrite(0x1);
if(oReturnCheck != Fapi_Status_Success) {
break;
}
oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)(0xF0000000),(uint8 *)Buffer+i,8,0,0,Fapi_AutoEccGeneration);
if(oReturnCheck != Fapi_Status_Success) {
break;
}
oReturnCheck = Fapi_disableBanksForOtpWrite();
if(oReturnCheck != Fapi_Status_Success) {
break;
}
6. Is the same steps as in algo above also valid for Bank7 OTP programming, with the difference of using Fapi_setActiveFlashBank(Fapi_FlashBank7) and Fapi_enableBanksForOtpWrite(0x80)?
Thanks for help!
Best regards,
Tomas
