Part Number: TMS320F28379D
Hello,
Recently I try to set up the communication of F28379D launchpad board with an external DAC evaluation board from Ti ( ADC8814EVM ).
I was puzzled by how to get 18 bits SPI communication with ADC8814, as required by its specification for some time. The additional 2 bits are used to select DAC channels.
There are some examples from Ti CCS. However, these examples are not that easy for me to understand as I am still a beginner .
I find that there is a relative easy way to use the functions from the example ( spi_ex1_loopback.c ) in CCS as following,
"SPI_writeDataNonBlocking(SPIA_BASE, rData);
SPI_writeDataNonBlocking(SPIA_BASE, sData);
rData = SPI_readDataBlockingNonFIFO(SPIA_BASE);
sData = SPI_readDataBlockingNonFIFO(SPIA_BASE);"
where we can repeat the function "SPI_writeDataNonBlocking" to transmit bits twice. One can select the bit width with SPI configuration function to 9 for each transmission.
I have checked the code with an oscilloscope. it works. The SPITEA signal which doesn't disable the transmission after the the first writing. Therefore, the external DAC board can recognize properly.
Although it works, there is an unclear point it me:
What is the function of the "SPI_readDataBlockingNonFIFO" ? I find it is also essential. One "SPI_writeDataNonBlocking" has to linked to one "SPI_readDataBlockingNonFIFO(SPIA_BASE);".
Best,
Alpha Beta