cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to trigger the ADC of STM32F103xx on both compare-events in when using center aligned PWM?

DMärz.1
Associate

Hello,

I am trying to generate a unipolar PWM-Signal with an STM32f103RBT6. The Current needs to be sampled at a specific point in the PWM-Cycle. Due to the unipolar nature the current cannot be sampled at overflow/underflow. Instead it needs to be measured between the transitions of the two Output compare channels.

To achive this behaviour would use a third compare channel which triggers the ADC. Is the ADC also triggered when the timer is counting down or only when it is counting upwards. The datasheet states: "When an external trigger is selected for ADC regular or injected conversion, only the rising edge of the signal can start the conversion". This raised the question: How does the internal signal look like?

It could be ether:

case A or B (picture below)

In case A only in during upcouning a ADC conversion is triggered. In case B on both compare events a conversion is triggered. Does anyone know which one is the case? The reference manual is not clear about that.

0690X00000DYekEQAT.jpg

0 REPLIES 0