Dear E2E:
I found that both the SPI_DAT0[15:0] and SPI_DAT1[15:0] are defined as the transmision buffer. I wonder is there any differrences between them, and which one should i use in normal operation?
Thanks,
Huang.
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.
Dear E2E:
I found that both the SPI_DAT0[15:0] and SPI_DAT1[15:0] are defined as the transmision buffer. I wonder is there any differrences between them, and which one should i use in normal operation?
Thanks,
Huang.
Huang,
The last 16 bits of both the registers are linked and will reflect the same value when you write to TXDATA in them but SPI_DAT1 provides additional formatting options so for convenience of programming only one register, I would recommend using SPIDAT1 as suggested by most of the documentation as well as driver code in Starterware and BIOS PSP.
Regards,
Rahul
Dear Rahul Prabhu:
Thanks a lot for your reply. I have another question about the CSHOLD bit of SPIDAT1. This bit is described that "The chip select signal is held active at the end of a transfer until a control field with new data and control information is loaded into SPIDAT1." when it's set heigh. I wander how to deactivate the chip select signal after an transmission if i don't need to send new data.
Thanks,
Huang!
Huang,
You will find the information regarding controlling the polarity of SPI Chip select on the following wiki:
http://processors.wiki.ti.com/index.php/Using_SPI_Chip_Select_Pin_on_C674x/OMAP-L1x
Rahul