Is there a way to configure HRTIM Dead time after initialization with HAL?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-06-15 10:11 AM
I am using STM32CubeIDE 1.6.1 with HAL libraries for STM32 G474RE. I would like to dynamically change the Duty Cycle, Period, and Dead time values for the HRTIM1: Timer A after initialization using HAL. After initial configuration set up by STM32CubeMX, I believe I can use __HAL_HRTIM_SETCOMPARE to change the Duty Cycle after initialization and use __HAL_HRTIM_SETPERIOD to change the Period after initialization.
Is there a way in HAL to change the Rising Value and Falling value of Dead Time after initialization?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-06-16 5:18 AM
Hello CWatt.1,
for changing the deadtime there is no prepared macro or specific function. You still can pretty easily change the register value using the hrtim handle:
hhrtim1->Instance->sTimerxRegs[HRTIM_TIMERINDEX_TIMER_D].DTxR=new_value;
Please see RM0440 (page 994) for the deadtime register definition and I would also recommend to check the application note AN4539 for some further information about HRTIM.
Please click on Select as Best if my reply fully answered your question. This will help other users with the same problem to find the solution faster!
