Hi All,
I'm having some difficulties with TMS320F280x OTP memory, maybe someone could help me out here.
I'm running my application partly from ram and partly from flash. At boot time I need to check OTP for a valid identifier. If it's not written before (All 0xFFFF) then I need to 'burn' the identifier to OTP.I've tried the following:
//runs code from ram
#pragma CODE_SECTION(OTP_VERIFY, "ramfuncs");
int OTP_VERIFY(void)
{ Uint16 *OTPMEM=0x003D7800;
if(OTPMEM[0] == 0XFFFF)
{
OTPMEM[0] = 0xFFFE;
asm(" nop");asm(" nop");asm(" nop");asm(" nop");asm(" nop");
asm(" nop");asm(" nop");asm(" nop");asm(" nop");asm(" nop");
return 1;
}
return 0;
}
But nothing is changed here, do I need to unlock OTP or..?
I also tried to use the Flash2809_API_V100.lib for the 2809 running from ram, but it returns error 12 'STATUS_FAIL_ADDR_INVALID.
Writing to flashs ection A-D works fine using the API.
Best regards,
Tjarco Boerkoel