mirror of
https://github.com/apache/nuttx.git
synced 2026-08-09 22:45:08 +00:00
arch/arm/src/stm32l4/stm32l4_hsi48.c: Enable CRS_CR_CEN with CRS_CR_AUTOTRIMEN
This commit is contained in:
parent
30620dfeb6
commit
4bcd1806f0
1 changed files with 3 additions and 2 deletions
|
|
@ -136,11 +136,12 @@ void stm32l4_enable_hsi48(enum syncsrc_e syncsrc)
|
|||
|
||||
/* Set the AUTOTRIMEN bit the CRS_CR register to enables the automatic
|
||||
* hardware adjustment of TRIM bits according to the measured frequency
|
||||
* error between the selected SYNC event.
|
||||
* error between the selected SYNC event. Also enable CEN bit to enable
|
||||
* frequency error counter and SYNC events.
|
||||
*/
|
||||
|
||||
regval = getreg32(STM32L4_CRS_CR);
|
||||
regval |= CRS_CR_AUTOTRIMEN;
|
||||
regval |= CRS_CR_AUTOTRIMEN | CRS_CR_CEN;
|
||||
putreg32(regval, STM32L4_CRS_CR);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue