File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -464,10 +464,13 @@ static void adc_config_channel(ADC_HandleTypeDef *adc_handle, uint32_t channel)
464
464
465
465
static uint32_t adc_read_channel (ADC_HandleTypeDef * adcHandle ) {
466
466
uint32_t value ;
467
- #if defined(STM32G4 )
468
- // For STM32G4 there is errata 2.7.7, "Wrong ADC result if conversion done late after
469
- // calibration or previous conversion". According to the errata, this can be avoided
470
- // by performing two consecutive ADC conversions and keeping the second result.
467
+ #if defined(STM32G4 ) || defined(STM32WB )
468
+ // For STM32G4 errata 2.7.7 / STM32WB errata 2.7.1:
469
+ // "Wrong ADC result if conversion done late after calibration or previous conversion"
470
+ // states an incorrect reading is returned if more than 1ms has elapsed since the last
471
+ // reading or calibration. According to the errata, this can be avoided by performing
472
+ // two consecutive ADC conversions and keeping the second result.
473
+ // Note: On STM32WB55 @ 64Mhz each ADC read takes ~ 3us.
471
474
for (uint8_t i = 0 ; i < 2 ; i ++ )
472
475
#endif
473
476
{
You can’t perform that action at this time.
0 commit comments