Skip to main content
WTom
Associate III
March 22, 2019
Question

STM32CubeMX 5.0.0/5.1.0 release with F334/HRTIM interrupt

  • March 22, 2019
  • 3 replies
  • 715 views

Doing R&D product development. I can't get the HRTIM interrupt to trigger when setting the Interrupt request source in STM32CubeMX. There is no difference in code generation and the interrupt parameter is not modified. Both releases use the same F3 firmware package. Looks like the code generation for this function is missing. Please look into it.

This topic has been closed for replies.

3 replies

WTom
WTomAuthor
Associate III
March 22, 2019

I’ve attached a screen capture of the STCubeMX HRTIME configuration , and one showing the HETIME PWM capture on the oscilloscope. The code generation created a global interrupt for HRTIME. I inserted a toggle call �? HAL_GPIO_TogglePin(GPIOB,5);�? as the first statement in the interrupt to see if the interrupt gets triggered. It does not get triggered, and I have verified the pin toggle works when inserted in the while(1) loop.

0690X0000088c3kQAA.bmp0690X0000088bypQAA.png

WTom
WTomAuthor
Associate III
March 22, 2019

I also verified that the code generated has no value in the interruptRequest parameter/register:

 pTimerCfg.InterruptRequests = HRTIM_MASTER_IT_NONE;
 pTimerCfg.DMASrcAddress = 0x0000;
 pTimerCfg.DMADstAddress = 0x0000;
 pTimerCfg.DMASize = 0x1;
 pTimerCfg.HalfModeEnable = HRTIM_HALFMODE_DISABLED;
 pTimerCfg.PreloadEnable = HRTIM_PRELOAD_DISABLED;
 pTimerCfg.RepetitionUpdate = HRTIM_UPDATEONREPETITION_DISABLED;
 pTimerCfg.DelayedProtectionMode = HRTIM_TIMER_D_E_DELAYEDPROTECTION_DISABLED;
 pTimerCfg.UpdateTrigger = HRTIM_TIMUPDATETRIGGER_TIMER_E;
 if (HAL_HRTIM_WaveformTimerConfig(&hhrtim1, HRTIM_TIMERINDEX_TIMER_E, &pTimerCfg) != HAL_OK)
 {
 Error_Handler();
 }

WTom
WTomAuthor
Associate III
March 26, 2019

Just to let anyone working on the HRTIM, I got the interrupt working by patching it with the inline assembler to change the "pTimerCfg.InterruptRequests = proper interrupt;" until it gets fixed in the next release of SW4STM32.