I need to generate two PWM signals using Teensy 3.1. The timmings look like that:
Actually, the two PWM signals are complementary but there is a deadtime (2us) between rise and fall of each waveform (I need to drive a MOSFET half-bridge so I have to avoid the shoot-through/cross-conduction by using that deadtime).
In my current implementation, I'm using a timebase of 2us (one cell width, in the image above) and I'm using digitalWrite to set the output pins accordingly.
Anyway, that's a very time (CPU) consuming task (triggering a 2us interrupt continuously). Is there a way to generate those signals using hardware timers?
Actually, the two PWM signals are complementary but there is a deadtime (2us) between rise and fall of each waveform (I need to drive a MOSFET half-bridge so I have to avoid the shoot-through/cross-conduction by using that deadtime).
In my current implementation, I'm using a timebase of 2us (one cell width, in the image above) and I'm using digitalWrite to set the output pins accordingly.
Anyway, that's a very time (CPU) consuming task (triggering a 2us interrupt continuously). Is there a way to generate those signals using hardware timers?