Skip to main content
Andrei Gheorghiu
Associate II
November 3, 2017
Question

UART Help

  • November 3, 2017
  • 2 replies
  • 2544 views
Posted on November 03, 2017 at 06:51

Hello,

I am using an STM 32 F401 Nucleo and i want to send numbers from PC via UART.

For example I need to set the frequency and amplitude.

Can some one help me to provide the code?

Thank you in advance.

    This topic has been closed for replies.

    2 replies

    Andrew Neil
    Super User
    November 3, 2017
    Posted on November 03, 2017 at 12:23

    PC code, or 

    STM32F401 code?

    http://www.lmgtfy.com?q=STM32F401+UART

     
    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.
    Andrei Gheorghiu
    Associate II
    November 3, 2017
    Posted on November 03, 2017 at 16:33

    Hi,

    For STM32F401.

    Tesla DeLorean
    Guru
    November 3, 2017
    Posted on November 03, 2017 at 16:58

    Should be able to use USART2 via PA2/PA3, buffer inbound data, parse, and process with sscanf(), etc.

    Might want to start with output, and adapt

    STM32Cube_FW_F4_V1.16.0\Projects\STM32F401RE-Nucleo\Examples\UART\UART_Printf\Src\main.c

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Vasile Guta_Ciucur
    Senior
    November 3, 2017
    Posted on November 03, 2017 at 13:03

    Andrei, in your STM32CubeF4 package you should find UART examples (Polling, IT and DMA) for your Nucleo board. Download it from here if you don't have it yet:

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

     
    Andrei Gheorghiu
    Associate II
    November 3, 2017
    Posted on November 03, 2017 at 16:30

    Salut Vasile,

    Ai mai  folosit placa  te pricepi?

    Vasile Guta_Ciucur
    Senior
    November 3, 2017
    Posted on November 03, 2017 at 18:23

    Salut, am alta placa, cu viteza mai mica, Nucleo-L152RE, prima de genul asta si primul meu micro STM32. Invat din mers