Closed Nikitarc closed 2 years ago
This is not in the right place. I opened an other issue in L4.
Describe the set-up STM32G4 LL driver V1.2.2 / 10-November-2021
Describe the bug The function LL_CRS_ConfigSynchronization uses: MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue) ;
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) ;
The function LL_CRS_SetHSI48SmoothTrimming() uses the shift.
How To Reproduce No need, read the code
Additional context Use << CRS_CR_TRIM_Pos
This is not in the right place. I opened an other issue in L4.
Describe the set-up STM32G4 LL driver V1.2.2 / 10-November-2021
Describe the bug The function LL_CRS_ConfigSynchronization uses: MODIFY_REG(CRS->CR, CRS_CR_TRIM, HSI48CalibrationValue) ;
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) ;
The function LL_CRS_SetHSI48SmoothTrimming() uses the shift.
How To Reproduce No need, read the code
Additional context Use << CRS_CR_TRIM_Pos