Skip to content

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

Merged
merged 9 commits into from
Jun 3, 2018
Merged

STM32 ADC update #6987

merged 9 commits into from
Jun 3, 2018

Conversation

jeromecoutant
Copy link
Collaborator

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

[X] Fix
[ ] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

@0xc0170 0xc0170 requested a review from a team May 23, 2018 12:01
// ADC calibration is done only once
if (!adc_calibrated) {
adc_calibrated = true;
if (!LL_ADC_REG_ReadConversionData6(obj->handle.Instance)) {
Copy link
Contributor

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 ?

Copy link
Collaborator Author

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

Copy link
Contributor

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);

Copy link
Contributor

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 ?

Copy link
Collaborator Author

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). */

Copy link
Contributor

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 ?

Copy link
Collaborator Author

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

@cmonr
Copy link
Contributor

cmonr commented May 31, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented May 31, 2018

Build : FAILURE

Build number : 2202
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6987/

@cmonr
Copy link
Contributor

cmonr commented May 31, 2018

Restarting CI. Multiple defined symbols seems like an old CI issue that hadn't shown up in a while.

[DEBUG] Errors: "/tmp/a7H4vd", line 124 (column 3): Warning: L6312W: Empty Execution region description for region RW_IRAM1
[DEBUG] Errors: Error: L6200E: Symbol __asm___10_fsl_rnga_c_3e53f3f3____REV16 multiply defined (by BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_rnga.o and BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_pit.o).
[DEBUG] Errors: Error: L6200E: Symbol __asm___10_fsl_rnga_c_3e53f3f3____REVSH multiply defined (by BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_rnga.o and BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_pit.o).
[DEBUG] Errors: Error: L6200E: Symbol __asm___10_fsl_rnga_c_3e53f3f3____RRX multiply defined (by BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_rnga.o and BUILD/K64F/ARM/mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/drivers/fsl_pit.o).

/morph build

@mbed-ci
Copy link

mbed-ci commented Jun 1, 2018

Build : SUCCESS

Build number : 2210
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6987/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jun 1, 2018

@cmonr
Copy link
Contributor

cmonr commented Jun 1, 2018

FYI @studavekar

@mbed-ci
Copy link

mbed-ci commented Jun 1, 2018

@cmonr
Copy link
Contributor

cmonr commented Jun 1, 2018

Export node got stuck.
/morph export-build

@mbed-ci
Copy link

mbed-ci commented Jun 2, 2018

@cmonr
Copy link
Contributor

cmonr commented Jun 2, 2018

/morph uvisor-test

@cmonr cmonr merged commit 07fb7c1 into ARMmbed:master Jun 3, 2018
@cmonr cmonr removed the needs: CI label Jun 3, 2018
@jeromecoutant jeromecoutant deleted the PR_ADC branch June 4, 2018 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants