Bringup
Open the editor
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.

VDDGNDPA0PA1PA2PA3PA4PA5PA6PA7PA8PA9PA10PA11PA12PA13PA14PA15PB0PB1PB2PB3PB4PB5PB6PB7PB8PB9PB10PB11PB12PB13PB14PB15PC0PC1PC2PC3PC4PC5PC6PC7PC8PC9PC10PC11PC12PC13PC14PC15PD2PF0PF1NRSTSTM32G474RET6
Schematic symbol

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.

PinNameFunctionsUse
VDDVDDSupply pinSupply 3.3 V: 100 nF next to every VDD pin plus a 4.7 µF bulk capacitor
GNDGNDGround pinGround
PA0PA0I/O pinTIM2_CH1TIM5_CH1ADC1_IN1ADC2_IN1Analog input: potentiometer, sensor voltage (0 V … supply)
PA1PA1I/O pinTIM2_CH2TIM5_CH2ADC1_IN2ADC2_IN2Analog input: potentiometer, sensor voltage (0 V … supply)
PA2PA2I/O pinTIM2_CH3TIM5_CH3TIM15_CH1USART2_TXLPUART1_TXADC1_IN3Serial console: USART2 goes to the ST-LINK virtual COM port on Nucleo-64 boards
PA3PA3I/O pinTIM2_CH4TIM5_CH4TIM15_CH2USART2_RXLPUART1_RXADC1_IN4Serial console: USART2 goes to the ST-LINK virtual COM port on Nucleo-64 boards
PA4PA4I/O pinTIM3_CH2ADC2_IN17Analog input: potentiometer, sensor voltage (0 V … supply)
PA5PA5I/O pinTIM2_CH1SPI1_SCKADC2_IN13User LED LD2 on Nucleo-64 boards; also SPI1 SCK
PA6PA6I/O pinTIM16_CH1TIM3_CH1SPI1_MISOADC2_IN3SPI data in (MISO): from DOUT / SDO of the device
PA7PA7I/O pinTIM17_CH1TIM3_CH2TIM1_CH1NSPI1_MOSIADC2_IN4SPI data out (MOSI): to DIN / SDA / SDI of the device
PA8PA8I/O pinTIM1_CH1I2C2_SDAI2C3_SCLI²C clock: sensors, displays; pull-up (about 4.7 kΩ) to the supply
PA9PA9I/O pinTIM1_CH2I2C2_SCLUSART1_TXSerial data out: to the RX pin of the other device (console, GPS, modules)
PA10PA10I/O pinTIM1_CH3USART1_RXSerial data in: from the TX pin of the other device
PA11PA11I/O pinTIM1_CH4USB_DMUSB full-speed data (real chip only, not simulated)
PA12PA12I/O pinUSB_DPUSB full-speed data (real chip only, not simulated)
PA13PA13I/O pinSWDIOSWD debug: keep free to flash and debug the real chip
PA14PA14I/O pinI2C1_SDAUSART2_TXSWCLKSWD debug: keep free to flash and debug the real chip
PA15PA15I/O pinTIM2_CH1I2C1_SCLUSART2_RXJTDISerial data in: from the TX pin of the other device
PB0PB0I/O pinTIM3_CH3ADC1_IN15Analog input: potentiometer, sensor voltage (0 V … supply)
PB1PB1I/O pinTIM3_CH4ADC1_IN12Analog input: potentiometer, sensor voltage (0 V … supply)
PB2PB2I/O pinADC2_IN12Analog input: potentiometer, sensor voltage (0 V … supply)
PB3PB3I/O pinTIM2_CH2SPI1_SCKSPI3_SCKUSART2_TXSWOSerial data out: to the RX pin of the other device (console, GPS, modules)
PB4PB4I/O pinTIM3_CH1SPI1_MISOSPI3_MISOUSART2_RXNJTRSTSerial data in: from the TX pin of the other device
PB5PB5I/O pinTIM3_CH2I2C3_SDASPI1_MOSISPI3_MOSISPI data out (MOSI): to DIN / SDA / SDI of the device
PB6PB6I/O pinTIM4_CH1USART1_TXSerial data out: to the RX pin of the other device (console, GPS, modules)
PB7PB7I/O pinTIM4_CH2I2C1_SDAUSART1_RXSerial data in: from the TX pin of the other device
PB8PB8I/O pinTIM16_CH1TIM4_CH3I2C1_SCLBOOT0BOOT0 on this chip: must be low at reset to boot from flash (default option bytes)
PB9PB9I/O pinTIM17_CH1TIM4_CH4I2C1_SDAI²C data: pull-up (about 4.7 kΩ) to the supply
PB10PB10I/O pinTIM2_CH3USART3_TXLPUART1_TXSerial data out: to the RX pin of the other device (console, GPS, modules)
PB11PB11I/O pinTIM2_CH4USART3_RXLPUART1_RXADC1_IN14ADC2_IN14Serial data in: from the TX pin of the other device
PB12PB12I/O pinADC1_IN11Analog input: potentiometer, sensor voltage (0 V … supply)
PB13PB13I/O pinTIM1_CH1NSPI2_SCKSPI clock: displays, flash, SD cards
PB14PB14I/O pinTIM1_CH2NTIM15_CH1SPI2_MISOADC1_IN5SPI data in (MISO): from DOUT / SDO of the device
PB15PB15I/O pinTIM1_CH3NTIM15_CH2SPI2_MOSIADC2_IN15SPI data out (MOSI): to DIN / SDA / SDI of the device
PC0PC0I/O pinTIM1_CH1LPUART1_RXADC1_IN6ADC2_IN6Serial data in: from the TX pin of the other device
PC1PC1I/O pinTIM1_CH2LPUART1_TXADC1_IN7ADC2_IN7Serial data out: to the RX pin of the other device (console, GPS, modules)
PC2PC2I/O pinTIM1_CH3ADC1_IN8ADC2_IN8Analog input: potentiometer, sensor voltage (0 V … supply)
PC3PC3I/O pinTIM1_CH4ADC1_IN9ADC2_IN9Analog input: potentiometer, sensor voltage (0 V … supply)
PC4PC4I/O pinI2C2_SCLUSART1_TXADC2_IN5Serial data out: to the RX pin of the other device (console, GPS, modules)
PC5PC5I/O pinUSART1_RXADC2_IN11Serial data in: from the TX pin of the other device
PC6PC6I/O pinTIM3_CH1TIM8_CH1PWM output: LED dimming, servos, motor drivers
PC7PC7I/O pinTIM3_CH2TIM8_CH2PWM output: LED dimming, servos, motor drivers
PC8PC8I/O pinTIM3_CH3TIM8_CH3I2C3_SCLI²C clock: sensors, displays; pull-up (about 4.7 kΩ) to the supply
PC9PC9I/O pinTIM3_CH4TIM8_CH4I2C3_SDAI²C data: pull-up (about 4.7 kΩ) to the supply
PC10PC10I/O pinSPI3_SCKUSART3_TXSerial data out: to the RX pin of the other device (console, GPS, modules)
PC11PC11I/O pinI2C3_SDASPI3_MISOUSART3_RXSerial data in: from the TX pin of the other device
PC12PC12I/O pinSPI3_MOSISPI data out (MOSI): to DIN / SDA / SDI of the device
PC13PC13I/O pinUser button B1 on Nucleo-64 boards (pressed = low)
PC14PC14I/O pinOSC32_IN32.768 kHz crystal for the RTC; weak outputs, avoid fast signals
PC15PC15I/O pinOSC32_OUT32.768 kHz crystal for the RTC; weak outputs, avoid fast signals
PD2PD2I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PF0PF0I/O pinADC1_IN10OSC_INMain crystal / external clock (HSE) — not a GPIO on most boards
PF1PF1I/O pinSPI2_SCKADC2_IN10OSC_OUTMain crystal / external clock (HSE) — not a GPIO on most boards
NRSTNRSTI/O pinReset, active low: internal pull-up, 100 nF to GND, optional button to GND

PCB

Verified land patternLQFP-64_10x10mm_P0.5mm
PackageLand patternStatusSource
LQFP64 · STM32G474RET6LQFP-64_10x10mm_P0.5mmVerified land patternKiCad 10.0.7 library: symbol STM32G474R_B-C-E_Tx (pin numbers), footprint Package_QFP:LQFP-64_10x10mm_P0.5mm (IPC-7351B land pattern)