1
Dependencies: mbed-dev-f303 FastPWM3
Diff: hw_setup.cpp
- Revision:
- 56:d34e4540ec12
- Parent:
- 37:c0f352d6e8e3
--- a/hw_setup.cpp Fri Aug 02 02:39:16 2019 +0000 +++ b/hw_setup.cpp Fri Aug 14 07:22:11 2020 +0000 @@ -50,16 +50,16 @@ ADC->CCR = 0x00000016; // Regular simultaneous mode only ADC1->CR2 |= ADC_CR2_ADON;//0x00000001; // ADC1 ON - ADC1->SQR3 = 0x000000A; // use PC_0 as input- ADC1_IN0 + ADC1->SQR3 = 0x000000D; // use PC_3 as input- ADC1_IN13 ADC2->CR2 |= ADC_CR2_ADON;//0x00000001; // ADC2 ON - ADC2->SQR3 = 0x0000000B; // use PC_1 as input - ADC2_IN11 + ADC2->SQR3 = 0x0000000C; // use PC_2 as input - ADC2_IN12 ADC3->CR2 |= ADC_CR2_ADON; // ADC3 ON ADC3->SQR3 = 0x00000000; // use PA_0, - ADC3_IN0 - GPIOC->MODER |= 0x0000000f; // Alternate function, PC_0, PC_1 are analog inputs + GPIOC->MODER |= 0x000000F0; // Alternate function, PC_2, PC_3 are analog inputs GPIOA->MODER |= 0x3; // PA_0 as analog input - ADC1->SMPR1 |= 0x1; // 15 cycles on CH_10, 0b 001 - ADC2->SMPR1 |= 0x8; // 15 cycles on CH_11, 0b 0001 000 + ADC1->SMPR1 |= 0x200; // 15 cycles on CH_13, 0b 001 000 000 000 + ADC2->SMPR1 |= 0x40; // 15 cycles on CH_12, 0b 001 000 000 ADC3->SMPR2 |= 0x1; // 15 cycles on CH_0, 0b 001;