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).
- Наука и техника