Analog to Digital Conversion (ADC) support.
Contents
ADC device type.
Public Members
- adc_reg_map * regs
Register map.
- rcc_clk_id clk_id
RCC clock information.
ADC register map type.
Public Members
- __io uint32 SR
Status register.
- __io uint32 CR1
Control register 1.
- __io uint32 CR2
Control register 2.
- __io uint32 SMPR1
Sample time register 1.
- __io uint32 SMPR2
Sample time register 2.
- __io uint32 JOFR1
Injected channel data offset register 1.
- __io uint32 JOFR2
Injected channel data offset register 2.
- __io uint32 JOFR3
Injected channel data offset register 3.
- __io uint32 JOFR4
Injected channel data offset register 4.
- __io uint32 HTR
Watchdog high threshold register.
- __io uint32 LTR
Watchdog low threshold register.
- __io uint32 SQR1
Regular sequence register 1.
- __io uint32 SQR2
Regular sequence register 2.
- __io uint32 SQR3
Regular sequence register 3.
- __io uint32 JSQR
Injected sequence register.
- __io uint32 JDR1
Injected data register 1.
- __io uint32 JDR2
Injected data register 2.
- __io uint32 JDR3
Injected data register 3.
- __io uint32 JDR4
Injected data register 4.
- __io uint32 DR
Regular data register.
External event selector for regular group conversion.
See: | adc_set_extsel |
---|
Values:
ADC1 and ADC2: Timer 1 CC1 event.
ADC1 and ADC2: Timer 1 CC2 event.
ADC1 and ADC2: Timer 1 CC3 event.
ADC1 and ADC2: Timer 2 CC2 event.
ADC1 and ADC2: Timer 3 TRGO event.
ADC1 and ADC2: Timer 4 CC4 event.
ADC1 and ADC2: EXTI11 event.
ADC1 and ADC2: Timer 8 TRGO event (high density only)
ADC1 and ADC2: Software start.
ADC3: Timer 3 CC1 event (high density only)
ADC3: Timer 2 CC3 event (high density only)
ADC3: Timer 1 CC3 event (high density only)
ADC3: Timer 8 CC1 event (high density only)
ADC3: Timer 8 TRGO event (high density only)
ADC3: Timer 5 CC1 event (high density only)
ADC3: Timer 5 CC3 event (high density only)
ADC3: Software start (high density only)
ADC1, ADC2, ADC3: Software start.
ADC sample times, in ADC clock cycles.
These control the amount of time spent sampling the input voltage.
Values:
1.5 ADC cycles
7.5 ADC cycles
13.5 ADC cycles
28.5 ADC cycles
41.5 ADC cycles
55.5 ADC cycles
71.5 ADC cycles
239.5 ADC cycles
ADC1 device.
ADC2 device.
ADC3 device.
Initialize an ADC peripheral.
Initializes the RCC clock line for the given peripheral. Resets ADC device registers.
Parameters: |
|
---|
Calibrate an ADC peripheral.
Parameters: |
|
---|
Set external event select for regular group.
Parameters: |
|
---|---|
See: |
Enable an adc peripheral.
Parameters: |
|
---|
Disable an ADC peripheral.
Parameters: |
|
---|
Disable all ADC peripherals.
Call a function on all ADC devices.
Parameters: |
|
---|
Turn the given sample rate into values for ADC_SMPRx.
Don’t call this during conversion.
Parameters: |
|
---|---|
See: |
Perform a single synchronous software triggered conversion on a channel.
Parameters: |
|
---|---|
Return: | conversion result |
Set the regular channel sequence length.
Defines the total number of conversions in the regular channel conversion sequence.
Parameters: |
|
---|
Set external trigger conversion mode event for regular channels.
Parameters: |
|
---|
ADC1 register map base pointer.
ADC2 register map base pointer.
ADC3 register map base pointer.