STM32 dual channel ADC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-17 11:46 PM
I am trying to read ADC from two channels without using DMA. For that I use this code:
Solved! Go to Solution.
- Labels:
-
STM32F1 Series
-
STM32L4 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-18 6:17 AM
> sConfig.Rank = ADC_REGULAR_RANK_2;
If you're only converting a single channel, this should be ADC_REGULAR_RANK_1.
> sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5
Consider increasing this. Also, you should initialize it in your ADC_Select_CH2 function, otherwise it will have an undefined value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-18 6:17 AM
> sConfig.Rank = ADC_REGULAR_RANK_2;
If you're only converting a single channel, this should be ADC_REGULAR_RANK_1.
> sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5
Consider increasing this. Also, you should initialize it in your ADC_Select_CH2 function, otherwise it will have an undefined value.
