Well, there goes my detailed post, eaten up by a forum bug. Anyway, has anyone used the dead-time generator in HRTIM here? I have a quick-and-dirty hysteretic constant current controller with 2 comparators and 2 DACs, feeding the HRTIM events EEV1 and EEV4. The HRTIM timer A outputs are set to be complementary with dead-time.
Now, the relevant dead-time setup code is:
pDeadTimeCfg.Prescaler = HRTIM_TIMDEADTIME_PRESCALERRATIO_MUL8;
pDeadTimeCfg.RisingValue = 511;
pDeadTimeCfg.RisingSign = HRTIM_TIMDEADTIME_RISINGSIGN_POSITIVE;
pDeadTimeCfg.RisingLock = HRTIM_TIMDEADTIME_RISINGLOCK_READONLY;
pDeadTimeCfg.RisingSignLock = HRTIM_TIMDEADTIME_RISINGSIGNLOCK_WRITE;
pDeadTimeCfg.FallingValue = 511;
pDeadTimeCfg.FallingSign = HRTIM_TIMDEADTIME_FALLINGSIGN_POSITIVE;
pDeadTimeCfg.FallingLock = HRTIM_TIMDEADTIME_FALLINGLOCK_READONLY;
pDeadTimeCfg.FallingSignLock = HRTIM_TIMDEADTIME_FALLINGSIGNLOCK_WRITE;
if (HAL_HRTIM_DeadTimeConfig(&hhrtim1, HRTIM_TIMERINDEX_TIMER_A, &pDeadTimeCfg) != HAL_OK)
{
Error_Handler();
}
This is almost exactly the same as ST's synchronous buck example. Above didn't work initially and caused some waveform overlap on the falling edge, see the attached screenshot. If I replaced this:
pEventCfg.FastMode = HRTIM_EVENTFASTMODE_ENABLE;
With this:
pEventCfg.FastMode = HRTIM_EVENTFASTMODE_DISABLE;
Suddenly it worked as expected.
I realize there are limitation in using async inputs, but I am unable to find anything relating lack of dead-time generation and using external events asynchronously in the reference manual. So, anyone has any ideas? I would like my inputs to not have the 6-7 clock re-synchronization latency, if at all possible.