Skip to content

Fixe adc #154

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 3 commits into from Nov 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cores/arduino/stm32/analog.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ uint16_t adc_read_value(PinName pin)
return 0;
}

#if defined (STM32F0xx) || defined (STM32F1xx) || defined (STM32F3xx) || defined (STM32L4xx)
#if defined (STM32F0xx) || defined (STM32F1xx) || defined (STM32F3xx) || defined (STM32L0xx) || defined (STM32L4xx)
/*##-2.1- Calibrate ADC then Start the conversion process ####################*/
#if defined (STM32F0xx) || defined (STM32F1xx)
if (HAL_ADCEx_Calibration_Start(&AdcHandle) != HAL_OK)
Expand Down
3 changes: 2 additions & 1 deletion variants/NUCLEO_F103RB/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const PinName digitalPin[] = {
PC_2, //D55/A9 = D28
PC_3, //D56/A10 = D29
PB_1, //D57/A11 = D41
PC_4 //D58/A12 = D45
PC_4, //D58/A12 = D45
PC_5 //D59/A13 = D35
};

#ifdef __cplusplus
Expand Down
3 changes: 2 additions & 1 deletion variants/NUCLEO_F103RB/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,14 @@ enum {
PC3_2,//D56/A10 = D29
PB1_2,//D57/A11 = D41
PC4_2,//D58/A12 = D45
PC5_2,//D59/A13 = D35
PEND
};

enum {
A_START_AFTER = D45,
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
A10, A11, A12,
A10, A11, A12, A13,
AEND
};

Expand Down
4 changes: 3 additions & 1 deletion variants/NUCLEO_F303RE/variant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ const PinName digitalPin[] = {
PC_2, //D54/A8 = D28
PC_3, //D55/A9 = D29
PC_5, //D56/A10 = D35
PC_4 //D57/A11 = D45
PB_11, //D57/A11 = D39
PB_2, //D58/A12 = D40
PC_4 //D59/A13 = D45
};

#ifdef __cplusplus
Expand Down
16 changes: 9 additions & 7 deletions variants/NUCLEO_F303RE/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,21 @@ enum {
PC1, //D50/A4
PC0, //D51/A5
// Duplicated pins in order to be aligned with PinMap_ADC
PA7_2,//D52/A6 = D11
PA6_2,//D53/A7 = D12
PC2_2,//D54/A8 = D28
PC3_2,//D55/A9 = D29
PC5_2,//D56/A10 = D35
PC4_2,//D57/A11 = D45
PA7_2, //D52/A6 = D11
PA6_2, //D53/A7 = D12
PC2_2, //D54/A8 = D28
PC3_2, //D55/A9 = D29
PC5_2, //D56/A10 = D35
PB11_2,//D57/A11 = D39
PB2_2, //D58/A12 = D40
PC4_2, //D59/A13 = D45
PEND
};

enum {
A_START_AFTER = D45,
A0, A1, A2, A3, A4, A5, A6, A7, A8, A9,
A10, A11,
A10, A11, A12, A13,
AEND
};

Expand Down