Microcontroller with real firmwareSTM32G474RET6stm32g474
STM32G474RE (Cortex-M4F, Firmware)
Runs real firmware (Zephyr / STM32Cube ELF or HEX, e.g. built for nucleo_g474re) on an emulated Cortex-M4F at 170 MHz: GPIO, EXTI, USART/LPUART, TIM PWM, ADC, SPI, I2C.
Key data
- Category
- ICs
- Simulation model
- Microcontroller with real firmware
- Manufacturer part number
- STM32G474RET6
- Reference prefix
- U
- Pins
- 54
- Land pattern
- LQFP-64_10x10mm_P0.5mm
Notes
The firmware runs on an emulated CPU core, instruction by instruction. Peripherals that the model implements (GPIO, timers, UART, SPI, I²C, ADC and others, see the description) act on the pins of the circuit, so the analog parts around the chip see the same voltages and timing as on a real board.
- Right-click the part and choose "Open in code editor" to write and compile its code; "Serial monitor" shows its UART output.
- In the inspector you can load a demo firmware or your own ELF / Intel HEX / BIN file instead.
- GPIO pins are real circuit pins: an LED on an output needs a series resistor, an input needs a defined level (pull-up or pull-down).
- The debugger in the code view stops at breakpoints and shows registers, variables and the call stack.
Simulation model
An emulated CPU core runs the firmware binary instruction by instruction. The GPIO pins are pins of the analog circuit: outputs drive through a driver resistance, inputs read the voltage with thresholds.
- Device
- stm32g474
- CPU core
- ARM Cortex-M4F
- Emulator
- ARM Cortex-M emulator
- Firmware
- Bare-metal C (arm-none-eabi-gcc) or a Zephyr project in the code view, or your own ELF / Intel HEX / BIN file
- Flash / RAM for firmware
- 512 KB / 96 KB
- Supply pins
- VDD / GND
- Mapped GPIO pins
- 52
Pins 54
simulatedreal chip onlyPin functions from the emulator and the datasheet.
| Pin | Name | Functions | Use |
|---|---|---|---|
| VDD | VDDSupply pin | Supply 3.3 V: 100 nF next to every VDD pin plus a 4.7 µF bulk capacitor | |
| GND | GNDGround pin | Ground | |
| PA0 | PA0I/O pin | TIM2_CH1TIM5_CH1ADC1_IN1ADC2_IN1 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PA1 | PA1I/O pin | TIM2_CH2TIM5_CH2ADC1_IN2ADC2_IN2 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PA2 | PA2I/O pin | TIM2_CH3TIM5_CH3TIM15_CH1USART2_TXLPUART1_TXADC1_IN3 | Serial console: USART2 goes to the ST-LINK virtual COM port on Nucleo-64 boards |
| PA3 | PA3I/O pin | TIM2_CH4TIM5_CH4TIM15_CH2USART2_RXLPUART1_RXADC1_IN4 | Serial console: USART2 goes to the ST-LINK virtual COM port on Nucleo-64 boards |
| PA4 | PA4I/O pin | TIM3_CH2ADC2_IN17 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PA5 | PA5I/O pin | TIM2_CH1SPI1_SCKADC2_IN13 | User LED LD2 on Nucleo-64 boards; also SPI1 SCK |
| PA6 | PA6I/O pin | TIM16_CH1TIM3_CH1SPI1_MISOADC2_IN3 | SPI data in (MISO): from DOUT / SDO of the device |
| PA7 | PA7I/O pin | TIM17_CH1TIM3_CH2TIM1_CH1NSPI1_MOSIADC2_IN4 | SPI data out (MOSI): to DIN / SDA / SDI of the device |
| PA8 | PA8I/O pin | TIM1_CH1I2C2_SDAI2C3_SCL | I²C clock: sensors, displays; pull-up (about 4.7 kΩ) to the supply |
| PA9 | PA9I/O pin | TIM1_CH2I2C2_SCLUSART1_TX | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PA10 | PA10I/O pin | TIM1_CH3USART1_RX | Serial data in: from the TX pin of the other device |
| PA11 | PA11I/O pin | TIM1_CH4USB_DM | USB full-speed data (real chip only, not simulated) |
| PA12 | PA12I/O pin | USB_DP | USB full-speed data (real chip only, not simulated) |
| PA13 | PA13I/O pin | SWDIO | SWD debug: keep free to flash and debug the real chip |
| PA14 | PA14I/O pin | I2C1_SDAUSART2_TXSWCLK | SWD debug: keep free to flash and debug the real chip |
| PA15 | PA15I/O pin | TIM2_CH1I2C1_SCLUSART2_RXJTDI | Serial data in: from the TX pin of the other device |
| PB0 | PB0I/O pin | TIM3_CH3ADC1_IN15 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB1 | PB1I/O pin | TIM3_CH4ADC1_IN12 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB2 | PB2I/O pin | ADC2_IN12 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB3 | PB3I/O pin | TIM2_CH2SPI1_SCKSPI3_SCKUSART2_TXSWO | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PB4 | PB4I/O pin | TIM3_CH1SPI1_MISOSPI3_MISOUSART2_RXNJTRST | Serial data in: from the TX pin of the other device |
| PB5 | PB5I/O pin | TIM3_CH2I2C3_SDASPI1_MOSISPI3_MOSI | SPI data out (MOSI): to DIN / SDA / SDI of the device |
| PB6 | PB6I/O pin | TIM4_CH1USART1_TX | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PB7 | PB7I/O pin | TIM4_CH2I2C1_SDAUSART1_RX | Serial data in: from the TX pin of the other device |
| PB8 | PB8I/O pin | TIM16_CH1TIM4_CH3I2C1_SCLBOOT0 | BOOT0 on this chip: must be low at reset to boot from flash (default option bytes) |
| PB9 | PB9I/O pin | TIM17_CH1TIM4_CH4I2C1_SDA | I²C data: pull-up (about 4.7 kΩ) to the supply |
| PB10 | PB10I/O pin | TIM2_CH3USART3_TXLPUART1_TX | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PB11 | PB11I/O pin | TIM2_CH4USART3_RXLPUART1_RXADC1_IN14ADC2_IN14 | Serial data in: from the TX pin of the other device |
| PB12 | PB12I/O pin | ADC1_IN11 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PB13 | PB13I/O pin | TIM1_CH1NSPI2_SCK | SPI clock: displays, flash, SD cards |
| PB14 | PB14I/O pin | TIM1_CH2NTIM15_CH1SPI2_MISOADC1_IN5 | SPI data in (MISO): from DOUT / SDO of the device |
| PB15 | PB15I/O pin | TIM1_CH3NTIM15_CH2SPI2_MOSIADC2_IN15 | SPI data out (MOSI): to DIN / SDA / SDI of the device |
| PC0 | PC0I/O pin | TIM1_CH1LPUART1_RXADC1_IN6ADC2_IN6 | Serial data in: from the TX pin of the other device |
| PC1 | PC1I/O pin | TIM1_CH2LPUART1_TXADC1_IN7ADC2_IN7 | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PC2 | PC2I/O pin | TIM1_CH3ADC1_IN8ADC2_IN8 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PC3 | PC3I/O pin | TIM1_CH4ADC1_IN9ADC2_IN9 | Analog input: potentiometer, sensor voltage (0 V … supply) |
| PC4 | PC4I/O pin | I2C2_SCLUSART1_TXADC2_IN5 | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PC5 | PC5I/O pin | USART1_RXADC2_IN11 | Serial data in: from the TX pin of the other device |
| PC6 | PC6I/O pin | TIM3_CH1TIM8_CH1 | PWM output: LED dimming, servos, motor drivers |
| PC7 | PC7I/O pin | TIM3_CH2TIM8_CH2 | PWM output: LED dimming, servos, motor drivers |
| PC8 | PC8I/O pin | TIM3_CH3TIM8_CH3I2C3_SCL | I²C clock: sensors, displays; pull-up (about 4.7 kΩ) to the supply |
| PC9 | PC9I/O pin | TIM3_CH4TIM8_CH4I2C3_SDA | I²C data: pull-up (about 4.7 kΩ) to the supply |
| PC10 | PC10I/O pin | SPI3_SCKUSART3_TX | Serial data out: to the RX pin of the other device (console, GPS, modules) |
| PC11 | PC11I/O pin | I2C3_SDASPI3_MISOUSART3_RX | Serial data in: from the TX pin of the other device |
| PC12 | PC12I/O pin | SPI3_MOSI | SPI data out (MOSI): to DIN / SDA / SDI of the device |
| PC13 | PC13I/O pin | User button B1 on Nucleo-64 boards (pressed = low) | |
| PC14 | PC14I/O pin | OSC32_IN | 32.768 kHz crystal for the RTC; weak outputs, avoid fast signals |
| PC15 | PC15I/O pin | OSC32_OUT | 32.768 kHz crystal for the RTC; weak outputs, avoid fast signals |
| PD2 | PD2I/O pin | General-purpose I/O: LEDs (with series resistor), buttons (with pull-up) | |
| PF0 | PF0I/O pin | ADC1_IN10OSC_IN | Main crystal / external clock (HSE) — not a GPIO on most boards |
| PF1 | PF1I/O pin | SPI2_SCKADC2_IN10OSC_OUT | Main crystal / external clock (HSE) — not a GPIO on most boards |
| NRST | NRSTI/O pin | Reset, active low: internal pull-up, 100 nF to GND, optional button to GND |
PCB
Verified land pattern
LQFP-64_10x10mm_P0.5mm| Package | Land pattern | Status | Source |
|---|---|---|---|
| LQFP64 · STM32G474RET6 | LQFP-64_10x10mm_P0.5mm | Verified land pattern | KiCad 10.0.7 library: symbol STM32G474R_B-C-E_Tx (pin numbers), footprint Package_QFP:LQFP-64_10x10mm_P0.5mm (IPC-7351B land pattern) |