Hello,
as in a title, is it possible to make CMPA and CMPB high resolution?
Here is what I am trying to do:
Count-mode : count-up
Output(let's say PWM3A) is high at CTR = CMPB
Output (PWM3A) is low at CTR = CMPA
PWM3A is controlled so as to be shifted from PWM1A. The amount to shift is decided by CMPB and the amount should be the high-reso.
The on-width is controlled by CMPA as you can see. The on-width also should be controlled in high-reso.
But according to the section 14.14.1.3 of the datasheet, the MEP is "programmed to be controlled either from the CMPAHR / CMPBHR register..."
If you take the sentence straightforward, it seems impossible to do what I want to do.
But there are two registers to determine edge modes that correspond to each CMPx.
This means, the edge mode can be individually set for corresponding CMPx and thus I assumed setting CMPA and CMPB high resolution is possible.
So I tried the following but it didn't work as intended.
CTLMODEB = 00b
EDGMODEB = 01b as CMPB controls the L to H timing of PWM3A.
CTLMODEA = 00b
EDGMODEA = 10b as CMPA controls the H to L timing of PWM3A.
So, back to the first question, is it possible to set CMPA AND CMPB high resolution?
And if yes, then what is the problem with my current settings?
Thanks,
Yukihiro Hatagishi