Hi Hercules champions,
I debug FEE example codes in HALCoGen's examples folder as:
\ti\Hercules\HALCoGen\v04.05.02\examples\TMS570LS04x_03x_02x\ example_TI_Fee_Write_Read
I followed all steps in this code as set up project in CCS and configure FEE in HALCoGen. It can work normally.
After i finish the example code running, i add a Read operation bases on the example:
Read the block1's data after Init(). and before write:
/* Initialize FEE. This will create Virtual sectors, initialize global variables etc.*/
TI_Fee_Init();
do
{
TI_Fee_MainFunction();
delay();
Status=TI_Fee_GetStatus(0 );
}
while(Status!= IDLE);
/* Read the block with unknown length */
BlockNumber=0x1;
BlockOffset = 0;
Length = 0xFFFF;
oResult=TI_Fee_Read(BlockNumber,BlockOffset,Read_Ptr,Length);
do
{
TI_Fee_MainFunction();
delay();
Status=TI_Fee_GetStatus(0);
}
while(Status!=IDLE);
/* Write the block into EEP Asynchronously. Block size is configured in ti_fee_cfg.c file. Default Block size is
8 bytes */
BlockNumber=0x1;
TI_Fee_WriteAsync(BlockNumber, &SpecialRamBlock[0]);
do
{
TI_Fee_MainFunction();
delay();
Status=TI_Fee_GetStatus(0);
}
while(Status!=IDLE);
As i understand that: Run the example code normally before, the data written into EEPROM(block1), so when i read the same block after init on the second time, it can read the date that stored in EEPROM. But i found that i can't read any data from it, the read_data[] are all 0!
Would you kindly help to tell me that whether my operation right? thanks!