Replies: 4 comments
-
In latest release (v1.0.6) timer3 and interrupt vectors definitions are unfinished. They will be fixed in next release. |
Beta Was this translation helpful? Give feedback.
-
@walon81 - once you have edited lgt8xp.h to have proper definitions for OCR3 you can use Timer3 on PF1/PF2. As they share pins with PD1 and PD2, you need to set those to input before the timer output is properly routed to the pin. (P.S. be careful with PD1 (TX) on the nano-style board. I found that high frequency PWM on that pin can disturb proper recognition of the Holtek USB chip) |
Beta Was this translation helpful? Give feedback.
-
I thought PD1 and PD2 are OC3A and OC3B respectively. Actually PF1 and PF2 are timer3 ouput as you said. Timer3 pwm works well. Thanks. For your reference, I use WAVGAT pro mini. |
Beta Was this translation helpful? Give feedback.
-
first of all, I tested dead time function of timer1. According to manual, basis signal is OC1B and by setting DTEN bit in TCCR1C, we can enable deadtime. And DTR1 determine deadtime duration. I figure out that DTR1H delay rising timing of OC1B as much as counter clock compare to original OC1B(waveform of OC1B when DTEN is disabled). DTR1L delay rising timing of OC1A.
But I have problem. Timer3 is not work. According to manual, pin 31,32(PD1,PD2) are OC3A and OC3B. timer1 and timer3 have same register structure. just replace 1 to 3(e.g. TCCR3A instead of TCCR1A) and done. But when I tested PD1 and PD2 by oscilloscope, there is no signal. just they are in low voltage(zero voltage with noise) all the way. Interrupt vector is also obscure.
Anyone know how to use timer3?
Beta Was this translation helpful? Give feedback.
All reactions