2024-12-25 09:16 AM
Hi, I implemented and tested the example TIM_OCActive, which is included in the STM32Cube_FW_G0_V1.6.2 package, using a NUCLEO-G071RB and the STM32CubeIDE version 1.17.0.
As the trigger signal for the oscilloscope I generated a 10 ms wide pulse by adding lines 3 and 4 in the below code snippet.
Question: although the trigger pulse is written only to the TIM1 CH1 output (PA8), it appears for all four channels, as can be seen in the below oscilloscope screenshot. Please explain that. Thank you!
/* Generate pulse (set/reset) TIM1 CH1 output pin as trigger
* reference for the oscilloscope */
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
HAL_Delay(10);
/*## Start signals generation ##*/
/* Start channel 1 in Output compare mode */
if(HAL_TIM_OC_Start(&htim1, TIM_CHANNEL_1) != HAL_OK)
{
/* Starting Error */
Error_Handler();
}