2021-11-16 02:43 AM
Hi,
I am using STM32L476 MCU.
I have COMP1 and COMP2 configured in window mode. That's working fine.
I would like to have COMP1 and COMP2 as break input sources for TIM1 BRKIN2.
LL_TIM_EnableBreakInputSource(TIM1, LL_TIM_BREAK_INPUT_BKIN2, LL_TIM_BKIN_SOURCE_BKCOMP1);
LL_TIM_EnableBreakInputSource(TIM1, LL_TIM_BREAK_INPUT_BKIN2, LL_TIM_BKIN_SOURCE_BKCOMP2);
LL_TIM_EnableBreakInputSource(TIM1, LL_TIM_BREAK_INPUT_BKIN2, LL_TIM_BKIN_SOURCE_BKCOMP1|LL_TIM_BKIN_SOURCE_BKCOMP2);
I checked BDTR and OR3 registers and everything is correctly set. For some reason, when both comparators are set as break inputs, the break event will never happen.
I also checked BRK2 polarity and it is correct.
I was wondering if anybody ever managed to used COMP1 and COMP2 as BRK2 input sources. As of today, I cannot explain why the input sources work correctly when set separately but don't work when set simultaneously.
Thanks!
Michel
2021-11-16 05:16 AM
> I checked BDTR and OR3 registers and everything is correctly set.
Show.
JW