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.
Tool/software: Code Composer Studio
Dear Sir,
I Can’t Receiver in SCI function while I run the project example with sci_ex1_echoback in C:\ti\c2000\C2000Ware_DigitalPower_SDK_2_00_01_00\c2000ware\driverlib\f28004x\examples directory.
But the transmit function is correct, the capture and pin connections as following:
GPIO28 is SCI_A-RXD and in Pin 76 of HSEC pin, Connecting to Txd of PC.
GPIO29 is SCI_A-TXD and in Pin 78 of HSEC pin, Connecting to Rxd of PC.
The gnd of Docking Station is connected to gnd of RS232.
The RS232 application in PC is Tera Term or Putty.
There is no characters in PC’s application while I typing characters.
Where could be the problem is?
Any one help will be much appreciated.
Best regard
Hung-Jin Chen
Hello,
Thank you for your question! You are correct that the transmit function is working properly, as Terra Term is showing the output from the device. When you suspend the debug window (Run->Suspend in Code Composer Studio) what function is this code stuck in? Could you provide a screenshot of the Debug tab once the program is suspended? If it is stuck in the "SCI_readCharBlockingFIFO" function, then it may be that no data is reaching the device.
In order to debug this further, would you be able to connect a logic analyzer or oscilloscope to the TX and RX pins of the C2000 device to monitor the data coming in and out? This will allow us to quickly dismiss several potential issues.
Thank you!
Vince
----------------------------------------------------------------------------------------------------------------------------
If I was able to answer your question, please press the green "Verified" button below, thanks!
Dear Vince,
Thanks for your reply.
I set the break point in the “while” loop for For_LOOP in main routine to execute the program.
while (SCI_getRxFIFOStatus(base)== SCI_FIFO_RX0);
The strange thing is that the Tera Term cannot completely display the msg string "\ r \ n \ n \ nHello World !\0", as shown in the figure below.
Then click>> Y , click
, then <F8>
The msg string is completely displayed now.
Then, I type a character, after active the Tera Term Windows.
The program stops in 1 of the following 3 programs.
If Step_Into <F5> is used, the program will circle around those 3 routines, and the characters input by the PC keyboard cannot be read.
May I know:
1. Why can't the msg string be output all at once?
2. How to change this program so that the characters input by the PC keyboard can be read normally.
Best Regard
Hung-Jin Chen
Hello,
I appreciate your follow up message and the details you provided! Answers below:
1. Why can't the msg string be output all at once?
A: When using the "step" functions of the debugger, a step forward can sometimes interrupt the SCI output and prevent the rest of the string from completing. In a normal run of the code (without breakpoints and without stepping through) all text will be displayed properly, as no debugger suspend requests are issued.
2. How to change this program so that the characters input by the PC keyboard can be read normally.
A: It looks like the device is stuck waiting for incoming communications to the device. Could you monitor the C2000-SCIRX line and see if data from the PC is reaching the C2000? It is possible that the RS232 and/or Terra Term is only able to receive, but not able to send data (could also be a setting in Terra Term).
Please provide oscilloscope or logic analyzer plots of the C2000-SCIRX line so we can potentially narrow down the issue to software/hardware! Thanks!
Regards,
Vince
----------------------------------------------------------------------------------------------------------------------------
If I was able to answer your question, please press the green "Verified" button below, thanks!
Dear Vince,
So far, I still can only output from the F280049 to the PC, and cannot read the characters sent by the PC via RS232; because I use an oscilloscope to monitor the SCIRxD (GPIO28), and there is no signal while I type a character in Tera Term utility.
However, would you please help is, can you actually connect the RS232 test once?
Thanks for your help!!!
Regards
Hung-Jin Chen
Hello,
Thanks for your work debugging this! It looks like our suspicion was correct, the Terra Term or RS232 are not correctly outputting any data for the C2000 to receive. Unfortunately, this means that we cannot directly assist in further debugging your setup as we cannot support other devices, but we can continue debug once the communications have reached the C2000 device!
I do have some suggestions for debugging the RS232 in the meantime:
* Please try a different terminal application (PuTTY may be beneficial to try)
* Please ensure that the correct drivers are installed on the PC for the RS232 device you are using to translate between the two
* Please ensure all connections required are connected securely and properly (Ohm-testing may be beneficial)
* IMPORTANT: Ensure the logic level of the RS232 device you are using is the correct voltage level for the SCI port you are using (3.3V and NOT 5V).
Please let me know if you have any further questions!
Regards,
Vince
----------------------------------------------------------------------------------------------------------------------------
If I was able to answer your question, please press the green "Verified" button below, thanks!
Dear Vince,
I have solved the problem of sending RS232 from PC but not receiving by F280049. That's because Pin2 and Pin3 of the S1:A switch on the F280049 ControlCARD are set to On at the factory; now, change them to Off.
Thank you very much for your help these days.
Regards
Hung-Jin Chen