cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L053 HAL Multi Channel DMA ADC

shorai
Associate III
Posted on January 18, 2016 at 19:07

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_Comparator

Thanks in advance

Chris

#stm32f051-hal-driver-adc-dma
1 REPLY 1
Posted on January 18, 2016 at 19:46

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..