cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 Communication between two microcontrollers

AVINASH PATHAK
Associate II
Posted on December 11, 2017 at 10:25

The original post was too long to process during our migration. Please click on the attachment to read the original post.
6 REPLIES 6
Posted on December 11, 2017 at 11:43

Do you really mean RS232 - or is this just a direct, logic-level connection?

See 'Hardware Implementation' here:

https://learn.sparkfun.com/tutorials/serial-communication

Have you tested both sides of the link with a terminal program on a PC before trying to put them together?

Posted on December 11, 2017 at 11:53

I have tested it from sender side and I am getting data send on serial window.

Thanks for answering.

Posted on December 11, 2017 at 12:14

Tried a scope on RX of the receiver, i.e. at the RX pin of the receiver MCU ?

A polarity issue ?

Tried to connect the receiver side to an external terminal (e.g. a PC) via an USB - serial adapter ?

Not going to wade all through this cube code ...

Posted on December 11, 2017 at 12:45

AVINASH PATHAK wrote:

I have tested it from sender side

How, exactly, did you test it.

Be specific. Remember: we cannot see what you're doing - we have to rely entirely upon what you post!

AVINASH PATHAK wrote:

I am getting data send on serial window.

Please clarify - I don't know what you mean by that.

What 'serial window' ?

Posted on December 11, 2017 at 14:24

I think your GPIO pins may need to be configured as '..._AF_PP' with some additional .Alternate setting.

Posted on December 11, 2017 at 15:24

Indeed, I would double check the port level initialization which CubeMX obfuscates into other files/functions.

Scope the pins and test sending from a terminal app, checking if the receive function reports errors, or the USART has status issue with respect to framing or other errors.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..