Skip to main content
edwin marcellin
Associate II
April 17, 2018
Question

RS232 Communication

  • April 17, 2018
  • 1 reply
  • 2607 views
Posted on April 17, 2018 at 16:53

Hello,

I have a STEVAL-FKI868V1 based on a Nucleo L152RE board and i would like to connect a RS232 to my RX pin to get the information and then send it when i click on the button.

So my main problem is about the code to developp to get the information from the RX.

Is someone could help me, please.

Thx

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    April 17, 2018
    Posted on April 17, 2018 at 17:25

    RS232 specifically, using a level converter like a MAX3232? Or serial communications using a USART more generally?

    The Nucleo board provides for a VCP (Virtual Serial Port) connection to the PC via the ST-LINK, one can open this up in a Terminal application in Windows/Linux

    The Cube L1 libraries should have assorted examples for USART connectivity.

    http://www.st.com/en/embedded-software/stm32cubel1.html

     

    >>So my main problem is about the code to develop to get the information from the RX. Is someone could help me, please.

    Sounds like a school or work assignment, generally you're expect to do that work yourself.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    edwin marcellin
    Associate II
    April 17, 2018
    Posted on April 17, 2018 at 17:44

    Thank you.

    No i have a module from Precla Molen that communicate in RS232. So i will do in USART. 

    >>Sounds like a school or work assignment, generally you're expect to do that work yourself.

    Yes usually but i have to do a quick proof of concept without spending that much time just to get information from sensors... I wanted to test this technology that i do not know.

    I also have a pb IAR. I can only connect my device once. After that i have to delete everything and install it again, because i cannot rebuilt all.

    Tesla DeLorean
    Guru
    April 18, 2018
    Posted on April 18, 2018 at 22:56

    The micro-controller will not accept RS232 level directly, you will need to interface to one of the available USART using a MAX3232 type device to convert the levels.

    http://www.ti.com/lit/ds/symlink/max3232.pdf

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