cancel
Showing results for 
Search instead for 
Did you mean: 

HRTIM external synch

DKuro.1
Associate III

Hi,

I am using STM32G474 with STM32CubeIDE.

I need to output the pin HRTIM_SCOUT from the master IC to another IC that will work as slave.

I am trying for so long... but it is not working.

Here is a piece of code that can help understand what I am doing:

hhrtim1.Instance = HRTIM1;
  hhrtim1.Init.HRTIMInterruptResquests = HRTIM_IT_NONE;
  hhrtim1.Init.SyncOptions = HRTIM_SYNCOPTION_MASTER;
  hhrtim1.Init.SyncOutputSource = HRTIM_SYNCOUTPUTSOURCE_MASTER_CMP1;
  hhrtim1.Init.SyncOutputPolarity = HRTIM_SYNCOUTPUTPOLARITY_NEGATIVE;
  if (HAL_HRTIM_Init(&hhrtim1) != HAL_OK)
  {
    Error_Handler();
  }

This is automatic code generation from the IDE.

I cannot see anything at the HRTIM_SCOUT output.

I also configured the master COMP1.

Here is the code I wrote to start the HRTIM with the TIMER_A:

  if (HAL_HRTIM_WaveformOutputStart(&hhrtim1, HRTIM_OUTPUT_TA1) != HAL_OK)
  {
    Error_Handler();
  }
 
  if (HAL_HRTIM_WaveformCountStart(&hhrtim1, HRTIM_TIMERID_MASTER | HRTIM_TIMERID_TIMER_A) != HAL_OK)
  {
    Error_Handler();
  }

And I can see the PWM output of the TA1 channel.

Any help on how can I see the output signal in HRTIM_SCOUT?

Best,

Daniel

1 REPLY 1

Hello,

Likely in CubeMx, in Mode window, "External Synchronization" should be put on "Enable Output Synchronization PIN".

Best ergards.