2019-11-11 11:55 AM
Hi,
Is there anywhere an example how we can use the HRTIM in push-pull mode and how to start the timer?
I had use the following instruction, but the outputs are always low.
HAL_HRTIM_WaveformOutputStart(&hhrtim1, HRTIM_OUTPUT_TE1 | HRTIM_OUTPUT_TE2);
HAL_HRTIM_WaveformCounterStart(&hhrtim1, HRTIM_TIMERID_TIMER_E);
regards
2019-11-12 12:20 AM
Hello @OGhis ,
Did you looked to the examples available under STM32Cube_FW_G4_V1.1.0\Projects\NUCLEO-G474RE\Examples\HRTIM?
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2019-11-12 01:07 AM
If you talking about the output pin, push-pull or open-dran is selected in the GPIO, not in the peripherals (such as HRTIM).
You also may want to have a look at AN4539 "HRTIM cookbook".
JW
2019-11-12 12:15 PM
I means that i will use the HRTIM for a Push pull power supply topology. (not the GPIO in push-pull mode).
see also RM0440 page 828
like in this schematic:
In the CubeMx is there a option for: "Push Pull".
This are the output signals i need:
2019-11-13 12:09 PM
I used the following code to start the Timer:
/* Start HRTIM's TIMER E */
HAL_HRTIM_WaveformOutputStart(&hhrtim1, HRTIM_OUTPUT_TE1);
HAL_HRTIM_WaveformOutputStart(&hhrtim1, HRTIM_OUTPUT_TE2);
HAL_HRTIM_WaveformCounterStart(&hhrtim1, HRTIM_TIMERID_TIMER_E) ;
HAL_HRTIM_WaveformSetOutputLevel(&hhrtim1,
HRTIM_TIMERINDEX_TIMER_E,
HRTIM_OUTPUT_TE1,
HRTIM_OUTPUTLEVEL_ACTIVE);
HAL_HRTIM_WaveformSetOutputLevel(&hhrtim1,
HRTIM_TIMERINDEX_TIMER_E,
HRTIM_OUTPUT_TE2,
HRTIM_OUTPUTLEVEL_ACTIVE);
I can see the signal on channel TE1, but the signal on channel TE2 has always a duty cycle of 50%
The set and reset source are configured as follow:
pOutputCfg.SetSource = HRTIM_OUTPUTRESET_TIMCMP1;
pOutputCfg.ResetSource = HRTIM_OUTPUTRESET_TIMPER;
And i use only the compare 1 register and the DEADTIME is active between the 2 outputs