stm32: Fix CAN for STM32G4

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
This commit is contained in:
Alex Maclean
2023-12-18 01:05:06 +00:00
committed by KevinOConnor
parent 147492b253
commit 77619e912c
2 changed files with 6 additions and 3 deletions

View File

@@ -105,6 +105,9 @@ enable_clock_stm32g4(void)
enable_pclock(CRS_BASE);
CRS->CR |= CRS_CR_AUTOTRIMEN | CRS_CR_CEN;
}
// Use PCLK for FDCAN
RCC->CCIPR = 2 << RCC_CCIPR_FDCANSEL_Pos;
}
// Main clock setup called at chip startup