2021-11-24 06:13 AM
Currently working with a STM32F103 MCU for a power metering application.
In order to have a programmable time shift between sampling voltage & current , i decided to use a PWM signal from the Timer to clock the ADCs.
I wanted to kick the ADC1 at the rising edge & the ADC2 at the falling edge.
The CubeMX doesn't show this feature in the TRGO , i checked out the code & it's preconfigured to rising edge ..Is that a limitation in the ADC of this family ? Or do i need to do something before it will appear in the configuration.
Regards,
Mohammed
Solved! Go to Solution.
2021-11-24 06:55 AM
Here are your options for triggers:
You could set TIM1_CH1 as the PWM output and configure CC2 and CC3 to trigger ADC1 and ADC2 at specific times during this PWM cycle.
The TRGO configuration is a per-timer setting, so you can't configure it to happen at the rising edge for one ADC and the falling edge for another.
2021-11-24 06:55 AM
Here are your options for triggers:
You could set TIM1_CH1 as the PWM output and configure CC2 and CC3 to trigger ADC1 and ADC2 at specific times during this PWM cycle.
The TRGO configuration is a per-timer setting, so you can't configure it to happen at the rising edge for one ADC and the falling edge for another.
2021-11-25 03:53 AM
I have been successful in making it (edge triggering with same timer for both ADCs) with F303 serie , the option is available while configuring TRGO2. Does this limitation coming from the abscence of TRGO2 in F103 ?
Thank you for the suggestion , i believe it will also work with your idea , i'll test it ASAP.