Part Number: TMS320F28035-EP
Other Parts Discussed in Thread: UNIFLASH
Hi, I am unable to find a way to flash USER OTP memory on F28035 MCU using the latest CCS v20. Could you please share any documents relating to this.
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.
Part Number: TMS320F28035-EP
Other Parts Discussed in Thread: UNIFLASH
Hi, I am unable to find a way to flash USER OTP memory on F28035 MCU using the latest CCS v20. Could you please share any documents relating to this.
Kiran,
The CCS flash plug-in should take care of this if you have defined memory with contents at the User OTP locations when you do a program load. Are you saying that with a supported .out file that CCS fails to program the OTP correctly?
Since OTP is one time only, there won't be an option to erase the OTP in the plug in dialog box.
Let me know if this answers your question, or if CCS v20 is blocking the OTP write when you load to that region.
Best,
Matthew
Hi Matthew,
I'm getting this error
C28xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
C28xx: Flash Programmer: Error encountered when writing to flash memory
C28xx: File Loader: Memory write failed: Unknown error
C28xx: GEL: File: C:\Users\E004\workspace_ccstheia\f2803x_flash_kernel\Debug\f2803x_flash_kernel.out: Load failed. I'm using SPRAAQ3 as reference.
The following is the linker file, I'm using.
MEMORY
{
PAGE 0 :
LINBOOTINIT : origin = 0x3D7800, length = 0x000020
LINBOOT : origin = 0x3D7820, length = 0x000400
PAGE 1 :
BOOT_RSVD : origin = 0x000000, length = 0x000050 /* Part of M0, BOOT rom will use this for stack */
RAMM0 : origin = 0x000050, length = 0x0003B0 /* on-chip RAM block M0 */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML2 : origin = 0x008C00, length = 0x000400 /* on-chip RAM block L2 */
RAML3 : origin = 0x009000, length = 0x001000 /* on-chip RAM block L3 */
/*FLASHB : origin = 0x3F4000, length = 0x002000 /* on-chip FLASH */
}
SECTIONS
{
.InitBoot : > LINBOOT, PAGE = 0
.text : > LINBOOT, PAGE = 0
.stack : > RAMM0 PAGE = 1
.ebss : >> RAMM1 | RAML2 | RAML3, PAGE = 1
LIN_BOOT : > LINBOOTINIT, PAGE = 0, ALIGN(4)
}

1)Can you try Uniflash to see if it gives the same error?
2)I looked at the GEL file included for CCS(C:\ti\ccs2040\ccs\ccs_base\emulation\gel\f28035.GEL) the only thing I am noticing is that OTP section is marked as writable, while flash is marked as read only(true in the sense you need to invoke the Flash API in order to program it). For the 2 lines that map out the OTP, can you change
GEL_MapAdd(0x3d7800,0,0x400,1,1); /* OTP */
to
GEL_MapAdd(0x3d7800,0,0x400,1,0); /* OTP */
I'm wondering if CCS is using this to determine if it needs to invoke the flash utility, and mis-interprets the "1,1" as the location being RAM.
menuitem "Initialize Memory Map";
hotmenu F28035_Memory_Map()
{
GEL_MapReset();
GEL_MapOn();
/* Program memory maps */
GEL_MapAdd(0x0,0,0x400,1,1); /* M0 SARAM */
GEL_MapAdd(0x400,0,0x400,1,1); /* M1 SARAM */
GEL_MapAdd(0xD00,0,0x100,1,1); /* PIEVECT(DSPBIOS)*/
GEL_MapAdd(0x8000,0,0x800,1,1); /* L0 SARAM */
GEL_MapAdd(0x8800,0,0x400,1,1); /* L1 SARAM */
GEL_MapAdd(0x8c00,0,0x400,1,1); /* L2 SARAM */
GEL_MapAdd(0x9000,0,0x1000,1,1); /* L3 SARAM */
GEL_MapAdd(0x3d7800,0,0x400,1,1); /* OTP */
GEL_MapAdd(0x3d7c80,0,0x040,1,1); /* Device Cal */
GEL_MapAdd(0x3d7cc0,0,0x040,1,1); /* Boot Get Mode */
GEL_MapAdd(0x3d7e80,0,0x001,1,0); /* PARTID value */
GEL_MapAdd(0x3d7e82,0,0x02F,1,0); /* Calibration Data*/
GEL_MapAdd(0x3e8000,0,0x10000,1,0); /* FLASH */
GEL_MapAdd(0x3f8000,0,0x400,1,1); /* L0 SARAM Mirror */
GEL_MapAdd(0x3fe000,0,0x2000,1,0); /* BOOT ROM */
/* Data memory maps */
GEL_MapAdd(0x0,1,0x400,1,1); /* M0 SARAM */
GEL_MapAdd(0x400,1,0x400,1,1); /* M1 SARAM */
GEL_MapAdd(0x800,1,0x1800,1,1); /* PF0 */
GEL_MapAdd(0x6000,1,0x0400,1,1); /* PF1-A */
GEL_MapAdd(0x6400,1,0x0600,1,1); /* PF3 */
GEL_MapAdd(0x6A00,1,0x0600,1,1); /* PF1-B */
GEL_MapAddStr(0x7000,1,0x1000,"R|W|AS2",0); /* PF2 */
GEL_MapAdd(0x8000,1,0x800,1,1); /* L0 SARAM */
GEL_MapAdd(0x8800,1,0x400,1,1); /* L1 SARAM */
GEL_MapAdd(0x8c00,1,0x400,1,1); /* L2 SARAM */
GEL_MapAdd(0x9000,1,0x1000,1,1); /* L3 SARAM */
GEL_MapAdd(0x3d7800,1,0x400,1,1); /* OTP */
GEL_MapAdd(0x3d7c80,1,0x040,1,1); /* Device Cal */
GEL_MapAdd(0x3d7cc0,1,0x040,1,1); /* Boot Get Mode */
GEL_MapAdd(0x3d7e80,1,0x001,1,0); /* PARTID value */
GEL_MapAdd(0x3d7e82,1,0x02F,1,0); /* Calibration Data*/
GEL_MapAdd(0x3e8000,1,0x10000,1,0); /* FLASH */
GEL_MapAdd(0x3f8000,1,0x0800,1,1); /* L0 SARAM Mirror */
GEL_MapAdd(0x3fe000,1,0x2000,1,0); /* BOOT ROM */
}