In output compare mode, does reading the FTMx_CnV register return the buffered value, or the loaded value?
1. Under an FTM overflow interrupt, I am calculating an output compare value and loading it into the FTMx_CnV buffer for loading at the next loading point (which I have configured as CNTMIN).
2. During that same interrupt cycle (i.e. before reaching the loading point), it's possible that I've also experienced an output compare match to the previously loaded CnV value. I would like to read that loaded CnV value and not the recently buffered value. Is this possible, or will reading the FTMx_CnV value return the recently buffered value from step (1).
Hello Andy,
Can you let me know which MCU are you using?
Best Regards,
Alexis Andalon
I'm using a K64 (MK64FN1M0VMD12, specifically)
Hello Andy,
I see that you are using the same channel in output compare mode and as overflow. These two modes can interfere between them. So it will be better if you use independent channels for each of the events.
Best Regards,
Alexis Andalon