started writting code

This commit is contained in:
Edward Emelianov
2026-04-08 23:48:23 +03:00
parent 0e9c7361b9
commit 9ef62c0d4d
33 changed files with 3320 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ void adc_setup(){
ADC1->SMPR2 = ADC_SMPR2_SMP0;
ADC1->SMPR1 = ADC_SMPR1_SMP16 | ADC_SMPR1_SMP17;
// sequence order: 1[0]->3[1]->14[2]->15[3]->10[4]->11[5] -> 16[tsen] -> 17[vdd]
ADC1->SQR3 = (1 << 0) | (3<<5) | (14 << 10) | (15 << 15) | (10 << 20) | (11 < 25);
ADC1->SQR3 = (1 << 0) | (3<<5) | (14 << 10) | (15 << 15) | (10 << 20) | (11 << 25);
ADC1->SQR2 = (12 << 0) | (13 << 5) | (16 << 10) | (17 << 15);
ADC1->SQR1 = (ADC_CHANNELS - 1) << 20; // amount of conversions
ADC1->CR1 = ADC_CR1_SCAN; // scan mode