2022-10-27 02:55 PM
Right now, I'm focusing on increasing ADC channel.
I assembled the STM32WB55VG microcontroller and 8:1 mux.
The mux is contolled by three GPIO pin for [2:0] encoding to select channel.
The output of mux is connected to the ADC and I can see the ADC data using DMA.
If I select one channel in the mux, I can collect data exactly.
However, if I operate the mux with switching channel (I gave ~1 ms of interval for each channel), the most recent channel data is filled to the previous channel (last channel data only appears in all the channel data).
I know that the microcontroller has single ADC and multiple channel itself and it works very well when I use scan conversion mode. It imply that there is a very quick reset state in the ADC to restart measurement for next channel.
So, I wonder how can I force to reset ADC measurement for the next channel in the coding and whether it is possible.
Solved! Go to Solution.
2022-10-27 03:22 PM
So, I wonder how can I force to reset ADC measurement for the next channel,,,,,
After switching the mux, restart the ADC conversion for its one channel and wait for DMA complete before reading the result.
2022-10-27 03:22 PM
So, I wonder how can I force to reset ADC measurement for the next channel,,,,,
After switching the mux, restart the ADC conversion for its one channel and wait for DMA complete before reading the result.
2022-10-28 01:35 PM
Oh!! it's working.
You are right. If I add HAL_ADC_Start(&hadc1); every time after changing MUX channel, the cross talking disappear!
Thanks man.