An interactive MCU register accessor through UART
Currently supporting STM32G4 only
- Create a project based on
SerialRegister.ioc- If you want to create a project from scratch, remember to correctly configure USART, DMA and their interrupts
- Add
uart_reg.hto includes anduart_reg.cppto sources - Call
uart_init() - Remerber that handlers are invoked in USART interrupts, so don't use
HAL_Delayin handlers
from g474 import *- Type the register name just like writing C (with
->replaced by.), e.g.TIM1.CNT - For reading, just type the name and press
Shift+Enter, it will print a table like the register description in Reference Manual; for writing, just make an assignment - You can access the whole register or bit fields, e.g.
TIM1.CR1.CEN = 1, which will be converted to a read-modify-write access; don't use operators like|=
- Generating register map from SVD file
- Eliminating UART and DMA configurations in STM32CubeMX - rewrite the framework with register access
- Adding 8- and 16-bit accessors to registers, and shortening UART transmissions