Question
Weird/Not fully understood behaviour of HRTIM
Posted on July 07, 2015 at 13:26
Iam having big problems with the high resolution timer on the STM32f334microcontroller.
I am using a period of 0xD3C2, this would normally mean that writting 0xD3C2 to a compare register is full duty cycle (or zero - actually 0x60, as I am running at 4GHz - depending on the polarity). -(I use compare registers one and two for two separate circuits).
And that the duty cycle will reduce progressively as you reduce the number. But this is not the case. what I have observed is that0xD3C2 to a compare register is full duty cycle, but the behaviour of the hardware is unpredictable between a value of 0xD3C2 and 0xD3A2(ish).Also, it seems that the act of writing to the compare register creates unusual spikes in the controlled circuits. I do know that the reference manualspecifies minimum and maximum values for compare registers depending on the CKPSC[2:0] values. I guess that these values are notnecessarily fixed, but depends on the actual period of PWM.I am not sure exactly why it behaves odd, but could any one please enlighten me on this.(I am running the PWM at about 85kHz)Thanks. #stm32f334 #hrtim