RS232 (UART) on STM32F4-Discovery (STM32F429ZIT6) with HAL library?

Background

Here are some of my premises so that your boyfriend knows what I have or not. I am completely new to this embedded system. And I don’t know anything about electronics, I'm a pure software guy.

My only experience with the embedded system is Raspberry Pi, which is very different from the STM32F4 detection.

I could implement UART read / write programming using the standard Linux C library on the Raspberry Pi, which connects to a PC with a USB-RS232 adapter with a voltage converter chip.

My device and development environment

  • STM32F429I-DISCO Board with MCM STM32F429ZIT6
  • A USB-to-RS232 cable and a voltage converter chip that works well on Raspberry Pi.
  • Keil uVision 5 IDE.

What I would like to achieve

STM32F429, / / . (, , , )

,

IDE Keil uVision / blink, , , . (Ex, )

, , - STM32F4 RS232.

  • -, , PIN- . datasheet TX DB9 PD2 (UART5_RX), RX DB9 PC12 (UART5_TX), VCC DB9 3.3V GND DB9 GND. ?

  • - , UART HAL, Keil uVision? , RCC_AHB1PeriphClockCmd, , , HAL Keil uVision.

  • USB-to-Serial 067b:2303 Prolific Technology, Inc. PL2303 Serial Port IC- . : enter image description here

  • Raspberry Pi , VCC/GND IC 3.3 V/GND Raspberry Pi, , .

  • "HAL" stm32f4xx_hal_usart.c , , , STMicroelectronics. - , , . , Enable USARTx interface clock Enable the clock for USART GPIOs, , . , , , .

enter image description here enter image description here

+4
1

github.

, STM-Cube. .ioc .

, , ,

USB VCport 
Timers set for RC hobby servos, just change pulse width 500-1500
ADC  in DMA mode
SPI  for flash etc
I2C  for port expansion or whatever

OP, , , , . 2016 , , ST, .

, , , , .

LCD "", "".

bluetooth UARTS .

++ ST. , , StdPeripheral , Cube HAL ( ) . . ?

.

</" >

Update your Cube and HAL libraries to the latest
Generate a cube project
Setup all your peripherals in the dialogs
Generate code
Compile
Add your application
Test  & Debug
Optimise
Release

, , .    F0 F1 F4.   F3 16- .


, , , RTFM. ( Fineprint )

UART, Virtual Comport, USB-. ST - .

STCube, / USB Virtual comport. HAL , .

Discovery STM32 Cube ( ST) , , , USB .

KEIL. , : -)

Embitz.org, IDE F429iDisco ST AC6 IDE ST . IDE , -, , -, .. .


, STM -, . Async - , , , USB .

Q1). , "", Rx TX .

, "loopback" UART .

Q2) - STM Cube Keil.

-, stm32cube_fw_f4_v130\STM32Cube_FW_F4_V1.3.0\Projects\STM32F429I-Discovery\Examples\UART Keil (MDK-ARM). UART5 - USART1 PA9 (Tx)/PA10 (RX), , UART5 USART1 → UART5.

, RX Tx , Rx, TX, , Rxbuffer .

, ., .

, Tx Rx.

loopback DB9.

DB9, , . (RTC, CTS, DCD, DTR, DTE) . . .

STM DB9, Tx Rx.

, STM , - , , .


407 ( ) - , 429 - F4Discovery vs F429i-Discovery. F4.

F4-Discovery - UART5 , I2S3D, CS43L422 () 12. F429

UART USART1.

- USART2 USART3

USARTS 2 3, RTS/CTS, .

, / .

USARTS STM32, . HAL, , - , Readline .

+5

Source: https://habr.com/ru/post/1625438/


All Articles