Question
Another error in LL CRS for G4 (function LL_CRS_ConfigSynchronization)
The function LL_CRS_ConfigSynchronization uses:
MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue) ;
But the delaration of LL_CRS_HSI48CALIBRATION_DEFAULT is:
#define LL_CRS_HSI48CALIBRATION_DEFAULT ((uint32_t)0x40U)
So the calibration value is set in the lower byte of CRS->CR.
But CRS_CR_TRIM is in the high byte
So LL_CRS_ConfigSynchronization should use:
MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue << CRS_CR_TRIM_Pos) ;
