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.

CCS/TMS570LS0432: TI FEE Driver- Write and Read data

Part Number: TMS570LS0432
Other Parts Discussed in Thread: HALCOGEN

Tool/software: Code Composer Studio

I am using TI FEE example given by halcogen and its working, I am able to see only 8 bytes data getting printed .

and on every reset the data gets printed to the incremeted address.

Please refer the attached picture for reference.

could you please explain why only the same 8 bytes getting printed on every reset.

also, when I try to watch  oResult=TI_Fee_Read(BlockNumber,BlockOffset,Read_Ptr,Length);

I always get 0 in oResult.  I want to read the data written in that block.  Please clarify the issue in detail.

Please help me, I just want to write some data and read them back.

my source code:

for(loop=0;loop<100;loop++)SpecialRamBlock[loop] = loop;

/* 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);

/* 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);

/* Write the block into EEP Synchronously. Write will not happen since data is same. */
TI_Fee_WriteSync(BlockNumber, &SpecialRamBlock[0]);

/* Read the block with unknown length */
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);

while(1);

  • please take the following case scenario: 

    I want save temperature and battery voltage to FEE.

    How shall I write and read these two variable. as I also need to update the value of temperature and battery voltage everytime. Currently when I try to do that then data gets saved in incremented location. it doesn't gets updated. I want to update the particular variable and save it in FEE everytime.

    also, how shall I read particular variable value stored in FEE. 

    Please help me with the code snippet.

  • Hello,
    oResult is the result of Read operation. If oResult is 0 then read operation is successful. Data itself read using TI_Fee_Read(BlockNumber,BlockOffset,Read_Ptr,Length); is in read_data[] pointed by Read_Ptr.

    Please, take a look at TI FEE Driver User Guide where you can find description of virtual sector organization, Data block structure and  functions.

    TI FEE User guide ( TI FEE User Guide.pdf ) can be found unser HALCoGen\your version\Docs directory.

    Best regards,
    Miro