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/LAUNCHXL-TMS57004: CAN NOT WRITE INT TO EEPROM FEE EMULATION

Part Number: LAUNCHXL-TMS57004

Tool/software: Code Composer Studio

Dear All,

I am trying to write an integer to EEPROM  @ BLOCK_NUMBER = 0x1. But I can not see the writen value on Memory Viewer.

Whay maybe the problem ?

Thanks.

/* USER CODE BEGIN (0) */
#include "ti_fee.h"
/* USER CODE END */

/* Include Files */
#include "sys_common.h"
/* USER CODE BEGIN (1) */

uint16 Status;
uint8 SOC;

Std_ReturnType oResult=E_OK;



unsigned char read_data[100]={0};


unsigned int BlockOffset, Length;
unsigned char *Read_Ptr=read_data;

int sayac=0;


void delay(void)
{
    unsigned int dummycnt=0x0000FFU;
    do
    {
        dummycnt--;
    }
    while(dummycnt>0);
}
/* USER CODE END */

/* USER CODE BEGIN (2) */
/* USER CODE END */

void main(void)
{
    sayac++;
    printf("BEKLE\r\n");
    SOC = 66;
    unsigned int BLOCK_NUMBER = 0x01;
    TI_Fee_Init();
    do
    {
        TI_Fee_MainFunction();
        delay();
        Status=TI_Fee_GetStatus(0 );
    }
    while(Status!= IDLE);

    printf("BEKLE\r\n");

    sayac++;

    TI_Fee_WriteAsync(BLOCK_NUMBER, &SOC);

    do
      {
          TI_Fee_MainFunction();
          delay();
          Status=TI_Fee_GetStatus(0);
      }
      while(Status!=IDLE);

    sayac++;

    printf("BEKLE\r\n");


    TI_Fee_WriteSync(BLOCK_NUMBER, &SOC);

    /* Read the block with unknown length */
     BlockOffset = 0;
     Length = 0xFF;
     oResult=TI_Fee_Read(BLOCK_NUMBER,BlockOffset,Read_Ptr,Length);
     do
     {
         TI_Fee_MainFunction();
         delay();
         Status=TI_Fee_GetStatus(0);
     }
    while(Status!=IDLE);

     sayac++;
     printf("BEKLE\r\n");


    /* Invalidate a written block  */
    TI_Fee_InvalidateBlock(BLOCK_NUMBER);
    do
    {
        TI_Fee_MainFunction();
        delay();
        Status=TI_Fee_GetStatus(0);
    }
    while(Status!=IDLE);
    sayac++;
    printf("BEKLE\r\n");

    /* Format bank 7 */
    TI_Fee_Format(0xA5A5A5A5U);
    sayac++;
    printf("BEKLE\r\n");

    while(1);





/* USER CODE BEGIN (3) */


/* USER CODE END */
}

  • Hello Yusuf,

    If you check the memory browser at the end of your main(), you will not see the data because the EEPROM was erased again by calling the function of TI_Fee_Format().

    Please check the memory right after the fee write operation is done.