Skip to main content
AVINASH PATHAK
Associate III
December 11, 2017
Question

RS232 Communication between two microcontrollers

  • December 11, 2017
  • 6 replies
  • 1601 views
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.
    This topic has been closed for replies.

    6 replies

    Andrew Neil
    Super User
    December 11, 2017
    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?

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
    AVINASH PATHAK
    Associate III
    December 11, 2017
    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.

    AvaTar
    Senior III
    December 11, 2017
    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 ...

    David Littell
    Senior II
    December 11, 2017
    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.

    Tesla DeLorean
    Guru
    December 11, 2017
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..