cancel
Showing results for 
Search instead for 
Did you mean: 

TIM_OCActive example, setting TIM1 CH1 output pin PA8 to HI is visible for all four channels

Kmax18
Senior II

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();
  }

 

 

 

Kmax18_0-1735145572749.png

 

2 REPLIES 2

Do you see those pulses also if you remove the HAL_GPIO_WritePin() line, leaving just the delay?

JW

TDK
Guru

edit: misunderstood what was being asked.

 

If you feel a post has answered your question, please click "Accept as Solution".