-
Notifications
You must be signed in to change notification settings - Fork 3k
STM32 ADC update #6987
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32 ADC update #6987
Conversation
// ADC calibration is done only once | ||
if (!adc_calibrated) { | ||
adc_calibrated = true; | ||
if (!LL_ADC_REG_ReadConversionData6(obj->handle.Instance)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how this macro can determine if the calibration has been done or not ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check RM:
ADC data register (ADC_DR)
Just after a calibration is complete, DATA[6:0] contains the calibration factor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -5660,12 +5660,6 @@ HAL_StatusTypeDef HAL_ADC_ConfigChannel(ADC_HandleTypeDef* hadc, ADC_ChannelConf | |||
/* Set handle of the other ADC sharing the same common register */ | |||
ADC_COMMON_ADC_OTHER(hadc, &tmphadcSharingSameCommonRegister); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it removed ? Is it a patch that we have added previously ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, same kind of patch as #6412
#define TEMPSENSOR_CAL1_TEMP (( int32_t) 30) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL1_ADDR (tolerance: +-5 DegC) (unit: DegC). */ | ||
#define TEMPSENSOR_CAL2_TEMP (( int32_t) 110) /* Internal temperature sensor, temperature at which temperature sensor has been calibrated in production for data into TEMPSENSOR_CAL2_ADDR (tolerance: +-5 DegC) (unit: DegC). */ | ||
#define TEMPSENSOR_CAL_VREFANALOG ( 3300U) /* Analog voltage reference (Vref+) voltage with which temperature sensor has been calibrated in production (+-10 mV) (unit: mV). */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To align with other STM32 families,
and be able to execute application like the one in #6398
/morph build |
Build : FAILUREBuild number : 2202 |
Restarting CI. Multiple defined symbols seems like an old CI issue that hadn't shown up in a while.
/morph build |
Build : SUCCESSBuild number : 2210 Triggering tests/morph test |
Test : SUCCESSBuild number : 2003 |
FYI @studavekar |
Exporter Build : ABORTEDBuild number : 1837 |
Export node got stuck. |
Exporter Build : SUCCESSBuild number : 1845 |
/morph uvisor-test |
Description
This PR extends #6399 (increase sampling time for ADC internal channels)
and #6412 (Only 1 internal channel could be configured which was wrong)
for all STM32 families
Tests from #6397 and #6398 have been verified for all targets
Pull request type