2022-12-27 09:27 AM
I am using STM32F031 family microcontroller and want to configure the ADC.
My application requires current sensing and voltage sensing. For critical measurement like current during PWM ON time, I am using the ADC in external trigger mode, triggered by the PWM timer channel.
However, for voltage sensing, I do not want the ADC to be externally triggered during the PWM ON time, instead, want to use it in regular conversion mode.
How can I achieve this, since I cannot see an option to combine both triggered and regular conversion modes of ADC? Any inputs will be helpful.
Regards,
GD
Solved! Go to Solution.
2022-12-27 11:57 AM
You would need a.richer ADC which has injected (high prio) channels edge triggered with dedicated data registers, with normal channels in continuous loop mode, as the STM32L4 probably has. Otherwise, run continuously and use EXTI to sw capture the adc channel you need, with a bit of sw jitter.
2022-12-27 11:57 AM
You would need a.richer ADC which has injected (high prio) channels edge triggered with dedicated data registers, with normal channels in continuous loop mode, as the STM32L4 probably has. Otherwise, run continuously and use EXTI to sw capture the adc channel you need, with a bit of sw jitter.
2022-12-27 01:26 PM
Auto code generation only provides for basic boilerplate templates of how things can work.
The HW may be capable of more exotic modes, but you'd need to read and understand the manuals, and experiment with switching modes, or using injected methods.
Other STM32 have multiple ADC allowing each to operate in different ways, with different channels.