IT lexicon › Hardware › RCC (Reset and Clock Control)

RCC (Reset and Clock Control)

Hardware På svenska → Updated: 2026-11-05

The STM32 peripheral that decides which clocks run, how fast, and which other peripherals get a clock at all.

It selects the clock source — internal RC oscillator (HSI), external crystal (HSE) or PLL — and sets the dividers for the AHB and APB buses. Each bus has an enable register in which every bit gates the clock to one peripheral, plus a matching reset register that puts it back to its power-on state. The RCC_CSR status register also records why the chip last reset.

Out of reset almost every peripheral is switched off to save power. That is why every driver begins with something like __HAL_RCC_GPIOA_CLK_ENABLE(), and why a forgotten clock bit is the most common explanation for a perfectly configured peripheral that does nothing. Some STM32 families have an erratum where the first access right after enabling can be lost, so the HAL follows the write with a pointless read-back.

← Back to the lexicon