Hi, LLMike,
The first thing for me is ...
HPWM max frequency with PBP is ...32767 Hz ...
so, 40 Khz need to use the PWM module " hand configured " .
The second one is ...
DT Interrupts handles by itself the interrupt enable and disable ... as you answered YES for resetFlag ...
The Third one is ...
I would stop TMR1 as it continues to run ... first, to read it comfortably, and second, to avoid a timer overflow ... note you'll have to reset it somewhere ... sooooo ... HAVE to stop it !!!
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Bookmarks