Skip to content

Commit

Permalink
fixed e230 and g431 UTILITY_TIMER to be 1MHz
Browse files Browse the repository at this point in the history
  • Loading branch information
tridge committed Oct 23, 2024
1 parent 9f39846 commit a5a8434
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Mcu/e230/Src/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void TIMER16_Init(void)
{
rcu_periph_clock_enable(RCU_TIMER16);
TIMER_CAR(TIMER16) = 0xFFFF;
TIMER_PSC(TIMER16) = 35;
TIMER_PSC(TIMER16) = 71;
timer_auto_reload_shadow_enable(TIMER16);
timer_enable(TIMER16);
}
Expand Down Expand Up @@ -440,4 +440,4 @@ void enableCorePeripherals()
EXTI_INTEN |= (uint32_t)EXTI_15;

UN_TIM_Init();
}
}
2 changes: 1 addition & 1 deletion Mcu/g431/Src/peripherals.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ void MX_TIM17_Init(void)
{
LL_TIM_InitTypeDef TIM_InitStruct = { 0 };
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM17);
TIM_InitStruct.Prescaler = 149;
TIM_InitStruct.Prescaler = 159;
TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;
TIM_InitStruct.Autoreload = 65535;
TIM_InitStruct.ClockDivision = LL_TIM_CLOCKDIVISION_DIV1;
Expand Down

0 comments on commit a5a8434

Please sign in to comment.