Skip to content

ADC driver #68

Open
0 of 4 issues completed
Open
0 of 4 issues completed
@bessman

Description

@bessman

The parent issue describes the remaining features that are required in the ADC driver. @Tejasgarg

  1. Timer configuration

The first thing that is needed is not directly related to ADC at all. We want to be able to configure the ADC sample rate at runtime, and that requires using a timer as trigger source. The first thing to do is therefore writing a timer driver which can generate a TRGO signal with a configurable period. See stm32h5xx_hal_tim.h TIM_TRGO_*.

Estimated task size: 2-4 days

  1. External conversion trigger

Once the timer driver is available, it needs to be hooked up to the ADC's external trigger input. See stm32h5xx_hal_adc.h ADC_EXTERNALTRIG_*.

Estimated task size: 2-3 days

  1. DMA output

The converted samples need to go somewhere. Use DMA to move them to a buffer, similar to the UART Rx mechanism.

Estimated task size: 1-2 days

  1. Simultaneous sampling

Generalize the driver to multiple ADCs. Enable simultaneous sampling of two different analog inputs. STM32 docs refer to this a "multimode".

Estimated task size: 3-5 days

These tasks are largely independent and can be completed in any order, except possibly for task 2 which requires some kind of external trigger source which may not be available until task 1 is complete.

Sub-issues

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions