博文

目前显示的是标签为“RCC”的博文

What does RCC mean on STM32?

图片
 On STM32 , RCC stands for Reset and Clock Control . It’s a big central block inside the microcontroller that is responsible for: Clocks (the “C” in RCC) RCC generates and distributes clocks to: The CPU core Buses (AHB, APB1, APB2, etc.) Peripherals (GPIO, USART, SPI, I²C, TIM, ADC, etc.) Typical things RCC does: Select clock sources: HSI (internal), HSE (external crystal), PLL , LSI , LSE , etc. Set prescalers to divide clocks for different buses. Choose the system clock (SYSCLK) and derived clocks like HCLK, PCLK1, PCLK2. Resets (the “R” in RCC) RCC can reset: The entire chip (system reset) Individual peripherals (e.g. reset just USART1, SPI2, etc.) This is used to: Bring peripherals to a known default state Recover a misconfigured peripheral by toggling its reset bit. Enabling / disabling peripheral clocks Before you can use most peripherals on STM32, you must enable their clock in RCC . Examples: // HAL example ...