Part Number: TMS320F280049C
Other Parts Discussed in Thread: C2000WARE
Hello,
I am working with the SCI driver in F28004x driverlib and have three queries on resetting the data buffers:
- Shouldn't the function SCI_resetChannels() in sci.h first clear the SCIRST bit in SCIFFTX before setting it?
The library function now is:
// // Reset the Tx and Rx Channels // HWREGH(base + SCI_O_FFTX) |= SCI_FFTX_SCIRST;
But I'm thinking it should be:
// // Reset the Tx and Rx Channels // HWREGH(base + SCI_O_FFTX) &= ~SCI_FFTX_SCIRST; HWREGH(base + SCI_O_FFTX) |= SCI_FFTX_SCIRST;
-
What exactly does clearing the SCIRST bit in SCIFFTX do? Does it only clear all data in the TX and RX shift registers and buffers? Or does it also clear all data in the TX and RX FIFO buffers?
- The F28004x TRM states that clearing the TXFIFORESET/RXFIFORESET bits in SCIFFTX/SCIFFRX will "reset the FIFO pointer to zero, and hold it in reset". Does this only reset the FIFO pointer without clearing existing data in the FIFO buffers?
I am using C2000Ware 3.01.00.00.
Thank you!