2021-11-17 04:54 PM
In STM32H7B0xxx platform, I use TIM8's TRGO2 to trigger ADC2 converstion.
In the MX_TIM8_Init() function, it will generate an update event and fire a TRGO signal unexpected before TRGO2 source initialize.
2021-11-18 05:43 AM
An update event is generated during initialization to ensure the PSC register is refreshed. Since the default TRGO output is tied to the update event, you get a TRGO event. This happens within HAL_TIM_Base_Init(). If you don't want this, you'll need to do your own timer initialization.
2021-11-18 06:10 AM
Thank you very much.
After tracing the HAL code, I find that at the time of software generate update event, all the trigger sources are in HW reset state. TRGO/TRGO2 trigger event sources have not been configured but trigger signal exist on TRGO/TRGO2.
I want to know who generate it ? how to avoid?
2021-11-18 06:25 AM
Only initialized timer Clock Division,ARR, counter mode, then raise an update event, I get TRGO/TRGO2 trigger.
2021-11-18 06:26 AM
> all the trigger sources are in HW reset state
JW
2021-11-18 06:45 AM
Got it. Thanks a lot.
It means at the HW reset state, timer will generate TRGO signal whenever by UG event.