2016-01-18 10:07 AM
Hi,
I'm having a problem getting the above to work with 2 channels using the cube generated code.I can get it to work on a single channel ADC, but not on multiple channels in scan mode.The HAL docs talk of ADC_Channel_conf_Type_def having 2 parameters (UM1749 pg89) ... channel and RANK but the library itself only has one parameter (the following taken from stm32l0xx_hal_adc.h)/**
* @brief ADC Configuration regular Channel structure definition
*/
typedef struct
{
uint32_t Channel; /*!< the ADC channel to configure
This parameter can be a value of @ref ADC_channels */
}ADC_ChannelConfTypeDef;
Any ideas what I am doing wrong?
My complete code can be found at https://github.com/shorai/stm32L05/tree/master/STM32F05_ADC_ComparatorThanks in advanceChris #stm32f051-hal-driver-adc-dma2016-01-18 10:46 AM
Other more advanced STM32 implementations can control the order (rank) that samples are taken. The Cortex-M0 implementations simply have a bit-vector for the channels and can scan forward or backward.