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

Merged
merged 9 commits into from Jun 3, 2018

Conversation

Projects
None yet
5 participants
@jeromecoutant
Contributor

jeromecoutant commented May 23, 2018

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 ARMmbed/team-st-mcd May 23, 2018

// ADC calibration is done only once
if (!adc_calibrated) {
adc_calibrated = true;
if (!LL_ADC_REG_ReadConversionData6(obj->handle.Instance)) {

This comment has been minimized.

@bcostm

bcostm May 23, 2018

Contributor

I don't understand how this macro can determine if the calibration has been done or not ?

This comment has been minimized.

@jeromecoutant

jeromecoutant May 23, 2018

Contributor

Check RM:
ADC data register (ADC_DR)
Just after a calibration is complete, DATA[6:0] contains the calibration factor

This comment has been minimized.

@bcostm

bcostm May 23, 2018

Contributor

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

This comment has been minimized.

@bcostm

bcostm May 23, 2018

Contributor

why is it removed ? Is it a patch that we have added previously ?

This comment has been minimized.

@jeromecoutant

jeromecoutant May 23, 2018

Contributor

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

This comment has been minimized.

@bcostm

bcostm May 23, 2018

Contributor

Why did you add this ?

This comment has been minimized.

@jeromecoutant

jeromecoutant May 23, 2018

Contributor

To align with other STM32 families,
and be able to execute application like the one in #6398

@bcostm

bcostm approved these changes May 23, 2018

@cmonr

cmonr approved these changes May 31, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented May 31, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented May 31, 2018

@cmonr

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 1, 2018

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 1, 2018

Export node got stuck.
/morph export-build

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Jun 2, 2018

/morph uvisor-test

@cmonr cmonr merged commit 07fb7c1 into ARMmbed:master Jun 3, 2018

13 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 847 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 8934 cycles (-509 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/littlefs Passed, code size is 9964B (+0.00%)
Details
travis-ci/tools Local tools testing has passed
Details

@cmonr cmonr removed the needs: CI label Jun 3, 2018

@jeromecoutant jeromecoutant deleted the jeromecoutant:PR_ADC branch Jun 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment