Description
The parent issue describes the remaining features that are required in the ADC driver. @Tejasgarg
- 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
- 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
- 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
- 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.