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.

TMS320F280049C: I2C Peripheral Using EEPROM

Part Number: TMS320F280049C

Hi,
I am Using Peripheral Example Code "i2c_eeprom".But I Am Unable to Read The Data From EEPROM.
My EEPROM Part number is 24C04.
I am Attaching the Code Below, Please Check it Once.

i2c_ex2_eeprom.c

  • Prem,

    We are working on getting this assigned to the correct subject matter expert.  Please give us another day to respond.

    Best,

    Matthew

  • Prem,

    It is not clear from your message what kind of failure you are seeing. Is EEPROM NACKing?

    i2c_ex2_eeprom example is outdated. I recommend you to consider below EEPROM I2C examples:

    If polling method is preferred, use i2c_ex4_eeprom_polling example

    If interrupt method is preferred, use i2c_ex6_eeprom_interrupt example.

    Regards,

    Manoj

  • Hi Sir,
    First of All Thank You.

    As You Said That " i2c_ex4_eeprom_polling example", I am Working on That.

    But I Have One Doubt regarding to the above example, How can I send One Byte address.

    I am using 24C04 EEPROM and Below is The Write Address Format.

    Please Check it Once and Give me Suggestions.

    Thank You.

     

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #include "driverlib.h"
    #include "device.h"
    #include "i2cLib_FIFO_polling.h"
    //
    // Globals
    //
    struct I2CHandle EEPROM;
    struct I2CHandle *currentMsgPtr; // Used in interrupt
    uint16_t passCount = 0;
    uint16_t failCount = 0;
    uint16_t AvailableI2C_slaves[1];
    uint16_t TX_MsgBuffer[MAX_BUFFER_SIZE];
    uint16_t RX_MsgBuffer[MAX_BUFFER_SIZE];
    uint32_t ControlAddr;
    uint16_t status;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • You need to use Example 1: EEPROM Byte Write. It generates START condition + TX target address  + TX data

  • Hi Sir,
    Thank You For Your Reply.
    1.EEPROM Byte Write Okay Sir I Understood, But Byte Read: I am Not Getting Read Operation.
    2.I Think in Read operation: it reads device address + RX data. Am I Correct?
    Could You Please Support Me To Solve read Operation with EEPROM.

  • First, please confirm whether EEPROM Byte Write worked in your setup.

    Here is how EEPROM Read byte command works:

    EEPROM Byte Read:

    START + TX Slave Address + TX EEPROM Address to read (MSB) + TX EEPROM Address to read (LSB) + Repeat START + RX Read byte as shown below

    Did you check I2C bus on logic analyzer?

    Regards,

    Manoj

  • Hi Sir,
    Below is My I2C Write Operation, I Checked on Logic Analyzer.

  • Good to know EEPROM write operation are working. Hope you will be able to get EEPROM read operation working as well

    Regard