bitpattern to setup CTRA for negedge-mode on pin 3
StefanL38
Posts: 2,292
Hi,
I would like to setup CTRA for neg-edge-mode on PIN 3 (based on pin-counting starting at 0)
How I understand the docs about counters I would use the following binary value
where 01110 is the countermode located in bits 30..26
PLL-mode not needed for this countermode
A-PIN 3 located in bits 5..0 as %000011
FRQA is set to 1
and then every time a high-to-low-transition on pin 3 happens PHSA should increment by 1
But it does not work. What am I doing wrong?
best regards
Stefan
I would like to setup CTRA for neg-edge-mode on PIN 3 (based on pin-counting starting at 0)
How I understand the docs about counters I would use the following binary value
' 3 2 1 '10987654321098765432109876543210 '%-CMODEPLL--------B__PIN---A__PIN '%00111000000000000000000000000011
where 01110 is the countermode located in bits 30..26
PLL-mode not needed for this countermode
A-PIN 3 located in bits 5..0 as %000011
FRQA is set to 1
and then every time a high-to-low-transition on pin 3 happens PHSA should increment by 1
But it does not work. What am I doing wrong?
best regards
Stefan
Comments
-Phil
BTW I am far from an expert with counters - so much functionality but no time to explore. Koroneko and Phil are the kings
-Phil