2025-06-18 3:41 AM
Dear ST trams,
I am using STM32H750 for a project. In the STM32CubeMX, I configured two ADCs in Dual regular simultaneous mode only. Also I am using DMA and a timer for trigger. I have activated 6 channel for each ADC. The sequencing of channels is as below:
ADC1: ch18 -> ch16 -> ch2 -> ch14 -> ch15 -> ch3
ADC2: ch10 -> ch4 -> ch2 -> ch5 -> ch9-> ch7
In the Keil debugging mode, when I am checking the ADC_BUFFER, I see that the sequence of channels is different. It seems that ADC2 sequence is shifted by one (like this: ADC2: ch7 -> ch10 -> ch4 -> ch2 -> ch5-> ch9 ). Could you please help me in this issue?
Could the problem is the clock prescaler?
Best regards,
Davood.
2025-06-18 4:46 AM
Hello,
For such scenario you need always to provide what you did already: share your code + cubemx config so others can help you efficiently.
See How to write your question to maximize your chances to find a solution
2025-06-18 5:19 AM
Why would theclock prescaler cause buffer samples to be shifted? That makes no sense. Stay objective.
There's a bug in your code. We can't see it. So show us the code and show us why you think it's not working correctly.
2025-06-18 5:49 AM
With selecting Asynchronous clock mode, I can have the converted ADC value in ADC_BUFFER. But by choosing Synchronous clock mode there is nothing!
Should I change other thing in my code when selecting synchronous clock mode in STM32CubeMX?
2025-06-18 6:25 AM
Hello again,
I found the problem why I have shifted in channel sequence with dual mode for two ADCs. I applied the synchronous clock mode for ADC prescaler the problem is solved. But when I want to use HAL_ADCEx_Calibration_Start, the MCU gets stuck in a infinite loop. Is there any conflict between HAL_ADCEx_Calibration_Start and synchronous clock mode?