Hi everyone,
I'm doing a project with Teensy 3.6, in which I would like to make an interrupt with a changeable timer, so that I can synchronize the timer overflow with the center of a PWM signal. I mean, I have made a PWM signal for controlling the current of a boost converter, and in order to sample the current at a correct time, I need to take the samples at the center of each PWM signal, when it's high ( '1' ). Doing this, I can read the correct current in all the CCM, CRM and DCM modes of the boost converter.
The PWM frequency is 100 kHz.
Does anyone have an idea about the approaches that I can use to implement this code?
Thanks in advance
I'm doing a project with Teensy 3.6, in which I would like to make an interrupt with a changeable timer, so that I can synchronize the timer overflow with the center of a PWM signal. I mean, I have made a PWM signal for controlling the current of a boost converter, and in order to sample the current at a correct time, I need to take the samples at the center of each PWM signal, when it's high ( '1' ). Doing this, I can read the correct current in all the CCM, CRM and DCM modes of the boost converter.
The PWM frequency is 100 kHz.
Does anyone have an idea about the approaches that I can use to implement this code?
Thanks in advance