Part Number: TMS570LC4357
Tool/software: Code Composer Studio
i have a problem with receiving data through sci module. I am printing 8 bytes of data through sci at a rate of 10ms (using rti).i am using putty to view my data.i am also using the polling method to see whether there is any new 8 byte data entered through serial monitor using sciIsRxReady in if condition,all inside the while loop.On entering the if condition i am using sci receive to extract 8 bytes of data and the new data is printed in rti interrupt at 10ms rate.Unfortunately i am unable to do so.Only the initial value i assign to the variable is getting printed on putty at a rate of 10ms(rti) but when i try to take an input of 8byte data through sciIsRxReady(in while loop) im unable to receive any data. Please help .
Does sciIsRxReady return value 1 when it receives one byte of data or when it receives data through serial monitor irrespective of the length of the data obtained??
Sarthake ChoudharyDoes sciIsRxReady return value 1 when it receives one byte of data or when it receives data through serial monitor irrespective of the length of the data obtained??
uint32 sciIsRxReady(sciBASE_t *sci)
/* USER CODE BEGIN (13) */
/* USER CODE END */
return sci->FLR & (uint32)SCI_RX_INT;
Through inspection of the code you will see it is only returning the value of the RX flag in the SCI flag register. A 1 indicates data is received. The SCI is only capable of receiving one byte at a time unless buffered mode is available (only in LIN modules used as SCI) but I do not think the Halcogen code accommodates buffered mode.
If you are manually entering the data in the terminal window that is sent to the Hercules device, there is no way you will be able to enter values at rate of 10ms each so that they are subsequently printed. My feeling is there are some logical issues with what you are attempting to program which sounds like a mirroring program where whatever is typed on the keyboard through the terminal window is then sent back out on the Tx pin to the terminal window. The caveat is you want to buffer 8 bytes then send out the data in 10ms intervals. If you could post either pseudo code or a flow chart of your code, you might see some logic that needs to be implemented to gate the Tx until all the bytes are received or to somehow identify that a new byte has been received and transmit the new byte.
Thanks and Regards,
In reply to Chuck Davenport:
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.