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.

TMS320F280038-Q1: TMS320F280038 - SPI communication

Part Number: TMS320F280038-Q1
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi Team, 

 We are using the TMS320F280038 - C2000 microcontroller family in our project. In that we have to communicate with M93C66 - EEPROM through SPI .

Connection between both two,

We are using SPI B for this communication,

initialization of the SPI B as follows

Sending and receiving the data, we follow the below routine

I follow the below procedure for writing to EEPROM IC,

1. send 0x04C0 command for enable the IC

2. send write command + address (ex., 0x059D)

3. Send the value (ex.,0x1234)

4. Send 0x0400 command for disable the IC

For reading purpose i follow the below routine,

1. send 0x04C0 command for enable the IC

2. send read command + address (ex., 0x069D)

3. receive the value from SPI Rx buf

4. Send 0x0400 command for disable the IC

Observed the SPI B registers also, the data send the SPITx Buf correctly,

But all the time i receive the 0xFFFF value from SPI Rx Buf .

Kindly suggest any point, i missed out.

Advance thanks and regards,

B.Punitha.

  • Hi Punitha,

    Is the EEPROM receiving appropriate power / voltage? When scoping the setup, do you see any odd behavior? What do you see on the SPI control and flag / status registers? 

    Ensure the PTE signal polarity matches the EEPROM requirement, and you have added the proper delay between CS transitions and write/read cycle time (typically 5ms).

    Finally, it is recommended to wait until the EEPROM is ready to read/write as doing either of these operations can result in incorrect values on the bus. This idea is shown in the C2000WARE examples. 

    Best Regards,

    Aishwarya