Why dual slow interleaved?

Probably a good idea is to add an additional method:

setADCMode(uint32_t ADC_Mode);

where ADC_Mode can be one of the following:
ADC_Mode_Independent
ADC_Mode_RegInjecSimult
ADC_Mode_RegSimult_AlterTrig
ADC_Mode_InjecSimult_FastInterl
ADC_Mode_InjecSimult_SlowInterl
ADC_Mode_InjecSimult
ADC_Mode_RegSimult
ADC_Mode_FastInterl
ADC_Mode_SlowInterl
ADC_Mode_AlterTrig

So if someone wants to have application specific requirement,
call setADCMode() and/or setADCSampleTime() once in the setup
before repeatedly calling analogRead() in the loop.

If setADCMode() is not called in the setup, analogRead should default to Slow-Interleaved or Independent so as not to break existing user code.

4 Likes