Tutorial Cube MX -5- USART polling STM32F4 Discovery

  • Опубликовано: 30 апр 2016
  • Working with USART in polling mode in a project generated by STM32Cube on STM32F4 Discovery is shown. Transmitting is OK, but receiving in polling is in principle not working if the loop contains any other instructions, because the transmission from the external source may finish while dealing with them. That is why using interrupts at receptions is highly recommendable, as it will be shown in the next tutorial.
    Most code is generated by Cube and only 2-3 HAL instructions are written by the programmer.
    Of course, a TTL to USB adapter is needed for the communication with the PC. I used a CH340, whose driver is easy to install and supports high bit-rate (up to 921600 bps).
  • Наука и техникаНаука и техника

Комментарии • 7

  • Руслан Архиреев
    Руслан Архиреев 8 месяцев назад

    Very useful video! But, I still have a question. Can I use ST-Link on my STM32F4 Discovery Board for USART communication, like on NUCLEO Boards?

  • halenova
    halenova Год назад

    hi thanks video. i have problem . i write code like u but after i send my data, i see in hyper terminal awkward data. for example i send "hello" i receive "AøAú". match baudrate. how can i fix this?

  • forever Iyou
    forever Iyou Год назад


  • Hyperloop
    Hyperloop 2 года назад

    is there any other terminal prog I can use, because this one is keep saying com not found even if I have com1 available ?

    • Sever Spanulescu
      Sever Spanulescu  2 года назад

      COM1 is the PC's RS232 serial port; you need a TTL to RS232 translator to use it, but it is an obsolete solution, only for desktops. I used a TTL to USB adapter (like FTDI 232, or CH340). You install its driver, which is a critical operation, and then check in Device Manager to see its COM number (usually 3, 4 or 5). Then you may use any terminal program. Sorry for not showing it in the video... Good luck!

  • Nguyễn Anh Danh
    Nguyễn Anh Danh 2 года назад

    Very useful. Thanks Sever Spanulescu.!

  • Mohammed Algailani
    Mohammed Algailani 2 года назад

    Nice and informative video.