F4: fix GMLAN clocks (#1624)

* init

* misra
This commit is contained in:
Igor Biletskyy 2023-08-31 09:55:12 -07:00 committed by GitHub
parent f89207328b
commit 3efa31a804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -128,9 +128,9 @@ void setup_timer(void) {
REGISTER_INTERRUPT(TIM8_BRK_TIM12_IRQn, TIM12_IRQ_Handler, 40000U, FAULT_INTERRUPT_RATE_GMLAN)
// setup
register_set(&(TIM12->PSC), (48-1), 0xFFFFU); // Tick on 1 us
register_set(&(TIM12->PSC), (APB1_TIMER_FREQ-1U), 0xFFFFU); // Tick on 1 us
register_set(&(TIM12->CR1), TIM_CR1_CEN, 0x3FU); // Enable
register_set(&(TIM12->ARR), (30-1), 0xFFFFU); // 33.3 kbps
register_set(&(TIM12->ARR), (30U-1U), 0xFFFFU); // 33.3 kbps
// in case it's disabled
NVIC_EnableIRQ(TIM8_BRK_TIM12_IRQn);