my counter only can count up, even the pulse is inverse, my counter wont count down also. How can let the counter count up and count down?Thks
you appear to be logging a number of new threads, all of which relate to use of the same counter. If your questions are on the same topic, we would recommend that you keep them to a single topic, rather than posting multiple questions.
Apologies for delay in getting back to you, Somehow we missed to look into your threads. Not sure whether you are still working on this issue, but please consider below points regarding this issue.
The CNT_CONFIG register suggests that counter operates in ‘rotary counter mode’ with both CUD & CDG pins have inverse polarity. i.e. falling edge at the CUD input will increment the counter; while a falling edge at CDG input, will decrement it.
I am not sure about what do you meant by ‘counter only can count up, even the pulse is inverse’. If you are talking about CUD pin, then it is correct behavior of counter. To decrement the count, you should apply pulses (falling edges) at CDG pin.
If you meant by pulses at CDG pin (which is connected to PF1 of processor), I would suggest you to try connecting this signals at PF3 (PB0 in BF506F EZ-KIT). Refer PORTF multiplexing.
The meaning of last statement of my previous reply is- "If SPORT0 TX operation is not enabled, RW0 is an input tap on pins PF0, PF2, and PF3. Otherwise, RW0 is an input tap on PF0, PF1, and PF9", as given in HRM.
Retrieving data ...