Start timer abstractions

This commit is contained in:
2025-08-28 02:47:52 -07:00
parent ed8db95818
commit 8979e1b28a
4 changed files with 130 additions and 7 deletions

View File

@@ -21,7 +21,9 @@ extern "C" void EXTI0_1_IRQHandler(void) {
int main() {
RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
RCC->AHBENR |= RCC_AHBENR_GPIOBEN;
RCC->APB1ENR |= RCC_APB1ENR_TIM2EN;
RCC->APB2ENR |= RCC_APB2ENR_SYSCFGEN; // Enable SYSCFG clock (needed for EXTI)
TIM2->EGR |= TIM_EGR_UG; //Force update to load PSC/ARR