sctimer_16bit_counter
Overview
The SCTimer 16-bit counter project is a demonstration program of the SDK SCTimer driver operation when using the SCTimer counter as two 16-bit counters. The example toggles an output per counter when a match occurs.
To use any 16-bit counter, this project disables the Unify 32-bit Counter by hardware limit, no matter the Low 16-bit one or the High 16-bit one. Both the Low 16-bit counters or the High 16-bit counters enable bidirectional mode to extend the 16-bit counting range. When the counter is in bidirectional mode, the effect of setting and clearing the output depends on whether the counter is counting up or down. The 16-bit low counter is scheduled for a match event every 0.1 seconds, and the 16-bit High counter is scheduled for a match event every 0.2 seconds. When a 16-bit counter event occurs, the output is toggled and the counter is reset.