2020-03-04 04:58 AM
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.