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.

TMS320F28335: Serial port output wrong without stop bit and continuous as '0'

Part Number: TMS320F28335
Other Parts Discussed in Thread: C2000WARE

I was sending out several bytes through the UART serial port, as shown in the picture. Between two yellow vertical lines is the last byte sending out, the byte between yellow line is not finished by sending out the stop bit ‘1’, instead it  continues as ‘0’ for some moment, what could cause this kind of situation? the serial port was  reset by software ? thanks for help

  • Hi Harry,

    Have you tried to do some trouble shooting?

    Without your configuration setup it is difficult to know what could be a possible issue. I would recommend you double check your configuration to make sure everything is getting set properly, specifically the communications control register (SCICCR).

    When configuring the SCICCR, the SCI port should first be held in an inactive state. This is done using the SW RESET bit of the SCI Control Register 1 (SCICTL1.5). Writing a 0 to this bit initializes and holds the SCI state machines and operating flags at their reset condition. The SCICCR can then be configured. Afterwards, re-enable the SCI port by writing a 1 to the SW RESET bit. At system reset, the SW RESET bit equals 0. "

    Also, please try running a C2000Ware example for SCI so we can rule out anything that might be happening with the device. If it works you can also use this to double check your configuration.

    C:\ti\C2000\C2000WARE_x\device_support\f2833x\examples\sci_x

    Best Regards,

    Marlyn

  • Hi, Marlyn,

    thanks for reply. 

    I have not figure out what's the best way to troubleshoot this problem yet, that's why I come here to ask.

    This project is not just started, so it is not that I just started to debug the serial port. We have some protocol built on serial port, when the program started to run, it is fine, uC can talk to others following protocol without any problem. Before  the error generated, it already talked a lot. But recent I added something, other side send some new command to uC, when uC send the response , the error happened. So, that's why in what situation could make this waveform generated? so far, I think, something reset Uart or disable Uart or stop TX function, could generate this error waveform.

  • I checked my code, and found two places where will sw reset Uart, I set breakpoint there, but never be reached. so it is still a puzzle to me who interrupt the UART byte transfer.

  • Hi Harry,

    Just to clarify, if you do not send the new command then this situation does not occur?

    Are you setting other breakpoints  besides the ones you mentioned? Sometimes depending on where these breakpoints are placed or if you step through your code in Debug mode the behavior can change. How are you running your code? I would suggest disabling any debug you may have to see if that alters the transmission.

    You could also check the SCI registers through the 'Watch Expression' window to see if their values are being altered. If they change back to the defaults then you know that a reset occurred in your code and we can take it from there.

    Please let me know what happens after you try both things.

    Best Regards,

    Marlyn

  • Hi, Marlyn

    I did not set any other breakpoints, make the program totally free running, the problem will also happen. and yes, it happens only when it receives the new command.

    After this error happened, it will stay at '0'  a few hundred mill second and then go back to '1', I want to make the program stop at the moment when it stays "0' and check the SCI register to see what happened, so far, did not find a good breakpoint for this yet.

    Yours

    harry

  • In what kind of situation, one byte which already transmitted several bits can be stopped in the middle of transmission? Just like the pic showing in the first post, the byte between two yellow lines should be 0x18, it already sent out at least 6bit correctly, then it is stopped, make the output continuously as '0', 

    Today I made a breakpoint , the same error can be seen on the scope, the following pic is the register value, looks like they are all OK.,

  • Harry,

    Have you checked the device that is sending the new command for any errors on that side? Do you receive exactly what you are expecting?

    It is odd that this only occurs with the new command.

    Another possible point to check is if the pin you are probing is still configured for SCI. If it is switched back to a GPIO or to another peripheral then that could cause the output to change.

    Best Regards,

    Marlyn

  • Hi, Marlyn,

    Thanks for help

    Finally, I figured out the problem, I should change the SCI to Free run mode, SCIPRI.Free =1. I did this on another serial port, but not this one, :(

    Have a nice weekend

    Yours

    Harry

  • Hi Harry,

    I am glad you were able to resolve the issue. Thank you for posting your solution for others to see.

    I hope you have a great weekend as well.

    Best Regards,

    Marlyn