

The STM32G474CBT6 is a high-performance microcontroller from STMicroelectronics, part of the STM32G4 series. It is built around a 32-bit ARM Cortex-M4 core with a floating-point unit (FPU) and operates at a maximum frequency of 170 MHz. This microcontroller is designed for applications requiring high computational power, precision analog capabilities, and advanced peripherals.
Common applications of the STM32G474CBT6 include:
With its rich set of peripherals, including high-resolution timers, multiple ADCs, and communication interfaces, the STM32G474CBT6 is a versatile choice for embedded system developers.








| Parameter | Value |
|---|---|
| Core | ARM Cortex-M4 with FPU |
| Maximum Clock Speed | 170 MHz |
| Flash Memory | 128 KB |
| SRAM | 32 KB |
| Operating Voltage | 1.7 V to 3.6 V |
| GPIO Pins | Up to 51 |
| ADC | 3x 12-bit ADCs (up to 5 MSPS) |
| DAC | 2x 12-bit DACs |
| Timers | 16 timers (including advanced motor timers) |
| Communication Interfaces | I2C, SPI, USART, CAN, USB, I2S |
| Package | LQFP-48 |
The STM32G474CBT6 comes in a 48-pin LQFP package. Below is a summary of key pins and their functions:
| Pin Number | Pin Name | Function(s) | Notes |
|---|---|---|---|
| 1 | VDD | Power Supply | 3.3V typical |
| 2 | VSS | Ground | Connect to ground |
| 3 | PA0 | GPIO/ADC_IN1/USART2_CTS | Multipurpose pin |
| 4 | PA1 | GPIO/ADC_IN2/USART2_RTS | Multipurpose pin |
| 5 | PA2 | GPIO/ADC_IN3/USART2_TX | Multipurpose pin |
| ... | ... | ... | ... |
| 48 | NRST | Reset Input | Active low |
For the full pinout, refer to the STM32G474CBT6 datasheet.
The STM32G474CBT6 can be programmed using the Arduino IDE with the STM32 core installed. Below is an example of blinking an LED connected to pin PA5:
// Include the STM32 HAL library
#include <Arduino.h>
// Define the LED pin
#define LED_PIN PA5
void setup() {
// Initialize the LED pin as an output
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// Turn the LED on
digitalWrite(LED_PIN, HIGH);
delay(500); // Wait for 500 ms
// Turn the LED off
digitalWrite(LED_PIN, LOW);
delay(500); // Wait for 500 ms
}
Microcontroller Not Responding
Unable to Program the Microcontroller
Peripheral Not Working
Q: Can I use the STM32G474CBT6 with 5V logic?
A: No, the STM32G474CBT6 operates at 3.3V logic levels. Use level shifters if interfacing with 5V devices.
Q: What development tools are compatible with the STM32G474CBT6?
A: You can use STM32CubeIDE, Keil uVision, IAR Embedded Workbench, or the Arduino IDE (with STM32 core).
Q: How do I enable the floating-point unit (FPU)?
A: The FPU is enabled by default in most development environments. Ensure your compiler settings support hardware floating-point operations.
This concludes the documentation for the STM32G474CBT6. For more details, refer to the official datasheet and reference manual from STMicroelectronics.