The base code is generated using STM32CubeMX and is initialized to the STM32F072-DISCO board.
- Open SW4STM32 and point the workspace to folder.
- Connect pins PC11 to TXD and PC4 to RXD of your serial device.
- If you're on Windows, open Radzio Modbus Master Simulator and connect with the following parameters. Adjust port number accordingly.
TIM7 init assumes MCU clock speed of 48Mhz.