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.

TMS320F28379D: SPI communication with 8 bits length

Part Number: TMS320F28379D

Hello,

I have TMS320F28379D which connects to a RTC module via SPI interface (4-wire).
The RTC module provides 8 bits length address and data.

When I configured the SPI with 16 bits (SPICHAR = 15) and used 16 bits read/write, the results are correct:

 spi_writeByte(0x0100); 
 second = spi_readByte(); //read register 0x01
However if the length of data is set to 8 (SPICHAR = 7), all the received data is wrong in the following two cases:

1.
spi_writeByte(0x01);            // seconds register read address
spi_readByte();                 // dummy read
spi_writeByte(0x01); 
second = spi_readByte(); //read register 0x01

2.
spi_writeByte(0x0100); 
second = spi_readByte(); //read register 0x01

Am I missing something?

Thanks,
HL