Associate II
April 17, 2020
Question
Timer PWM ETR functionality: ADC remap and ETR filter
- April 17, 2020
- 5 replies
- 4729 views
I have been working on a motor control project for a three phase BLDC motor. So far I have implemented the center aligned PWM output over Timer1 of STM32F303CB. I want to add a current limiting feature such that the PWM gets halted when a current beyond threshold is read.
I came across the ETR functionality through ADC remap of the MCU. I have configured the clearing source to be ETR and clear channels enabled. Questions I have:-
- Is the existing configuration for timer1 as shown in the figure correct? If not what are the required changes.
- Can I connect my current sensor and set an ADC watchdog for a throshold of current and further trigger the ETR.
- If yes what is the role of clear source filter. Will it act as a filter for my ADC channel?
- From the reference manual I found out that the ADC remap is ORed with the ETR. Does is mean I still need to provide an ETR source?
Thanks in advance
Attached is the STMCube configuration and snippets of material I found from reference manuals.