How stephenj4xx/stm32-morsesenderpart works
This STM32F407 firmware receives a complete message over UART, treats a period as the terminator, then encodes and transmits the message as timed Morse signaling on GPIO. The principal application logic is in Core/Src/main.c; peripheral initialization is split across the generated Core/Src modules. The README documents the workflow and hardware interfaces. Source excerpts do not show the full Morse lookup or GPIO timing routines, so those relationships are documented rather than independently verified in their implementations.
Main entry points: main.c Main controller · usart.c USART2 interface · gpio.c GPIO signaling · stm32f4xx_hal.h STM32 HAL
Components 13
Application workflow
- Main controller
Core/Src/main.c - UART capture
Core/Src/main.c - Message buffer
Core/Src/main.c - End detection
Core/Src/main.c - Morse encoding
Core/Src/main.c - Signal timing
Core/Src/main.c
Peripheral interfaces
- USART2 interface
Core/Src/usart.c - GPIO signaling
Core/Src/gpio.c
Hardware platform
Other components
- PC terminal
- USB-UART adapter
- Morse receiver
Connections 13
- PC terminal → USB-UART adapter: sends text
- USB-UART adapter → USART2 interface: serial input
- Main controller → USART2 interface: initializes
Core/Src/main.c - USART2 interface → UART capture: receives bytes
Core/Src/main.c - UART capture → Message buffer: stores bytes
Core/Src/main.c - Message buffer → End detection: checks period
Core/Src/main.c - Main controller → Message buffer: copies complete message
Core/Src/main.c - Main controller → Morse encoding: calls encoder
Core/Src/main.c - Morse encoding → Signal timing: forms timed symbols
Core/Src/main.c - Signal timing → GPIO signaling: drives signal
- Main controller → GPIO signaling: initializes
Core/Src/main.c - GPIO signaling → Morse receiver: transmits Morse
- STM32 HAL → STM32F407: supports peripherals