Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN
Hi team,
In our Application for the TMS570LC4357 processor, we are using "F021_API_CortexR4_BE_L2FMC.lib” for erasing and programming internal EEPROM.
We are following the procedure mentioned in the SPNU501G document for accessing internal EEPROM operations ( Section 5.3) and used below functions for programming and reading:
For Programming:
Fapi_issueProgrammingCommand((Uint32 *)dst,(Uint8 *)src,(Uint8)8U,0,0,Fapi_AutoEccGeneration);
Read:
Fapi_doMarginReadByByte((Uint8 *)src,(Uint8 *)dst,(Uint32) bytes,Fapi_NormalRead);
But, while programming EEPROM sectors ( after erasing the sector) we have observed that for every 8 bytes of data programmed, we are reading junk values for the first byte.
For eg. If we want to program the data as below ( at location 0xF0200000):
{0x11, 0x22, 0x33, 0x44, 0x11, 0x22, 0x33, 0x44, 0xAA, 0x22, 0x33, 0x44, 0x11, 0x22, 0x33, 0x44},
when we read back from EEPROM, we are reading the values below:
{0xA1, 0x22, 0x33, 0x44, 0x11, 0x22, 0x33, 0x44, 0xAB, 0x22, 0x33, 0x44, 0x11, 0x22, 0x33, 0x44}.
And Also we have observed that the memory browser does not reflect the proper data in the window, even for the erase though we are reading the correct data when it has been programmed.
Please let us know if we have to enable ECC any changes we have to in liker file ( cmd) file as shown below:
MEMORY
{
/* ROM */
VECTORS (X) : origin=0x00200020 length=0x00000020 vfill = 0xffffffff
FLASH_API (RX) : origin=0x00200040 length=0x000014C0
/*FLASH0 (RX) : origin=0x00040000 length=0x0003FFFF*/
FLASH1 (RX) : origin=0x00200040 + 0x000014C0 length=0x00200000 - 0x40 vfill = 0xffffffff
EEPROM (RW) : origin=0xF0200000 length=0x00020000
/* RAM */
STACKS (RW) : origin=0x08000000 length=0x00001C00
RAM (RW) : origin=0x08001C00 length=0x00040000
RAM_API (RW) : origin=0x08041C00 length=0x00008000
SHAREDRAM (RW) : origin=0x08049C00 length=0x00001000
}
/*----------------------------------------------------------------------------*/
/* Section Configuration */
SECTIONS
{
.intvecs : {} > VECTORS
flashAPI :
{
..\..\..\Fapi_UserDefinedFunctions.obj
--library=..\..\..\\F021_API_CortexR4_BE_L2FMC.lib (.text)
} load = FLASH_API, run = RAM_API, LOAD_START(api_load), RUN_START(api_run), SIZE(api_size)
.text align(32) : {} > FLASH1
.const align(32) : {} > FLASH1
.cinit align(32) : {} > FLASH1
.pinit align(32) : {} > FLASH1
.init_array align(32) : {} > FLASH1 /* Global constructors */
.bss : {} > RAM
.data : {} > RAM
.sysmem : {} > RAM
.sharedRAM : {} > SHAREDRAM
.eeprom : {} > EEPROM
}