cancel
Showing results for 
Search instead for 
Did you mean: 

Why doesn't CubeMX set register HRTIM_TIMxDIER = 0x0008 when I have configured HRTIM Timer A to interrupt on CMP4? It is left at value = 0.

ORidl.1
Associate

Nucleo F334R8. I setup HRTIM Timer A to generate 2 pulses per HRTIM cycle with Compare 1,2, 3 and 4 registers and this generates the expected outputs. However HRTIM_TIMxDIER is left at 0 by the cube MX code.

Under NVIC settings for HRTIM1 I have ticked "HRTIM timer A global interrupt"

Under Timer A settings I have "Interrupt Requests Sources Selection" set to 1 and "1st Interrupt Request Source" set to "Timer Compare 4 interupt enable"

Compare 4 register is set to a value which controls the reset condition for the output and this works fine. The HR timer generates PWM outputs as expected, just the interrupts are not generated.

I start the timer with "HAL_HRTIM_SimpleOCStart_IT"

If I manually set HRTIM_TIMxDIER to value 0x0008 then the interrupt works as expected.

.IOC file attached.

Am I missing something ?

Thanks,

Oliver

1 REPLY 1

Do you find it surprising that there are bugs in Cube/CubeMX, especially in the darker corners?

JW