14
QDEC
14.1 QDEC introduction
The quadrature decoder is used to decode the two sets of pulses with a phase difference of 90 degrees generated
by the dual-path rotary encoder into the corresponding speed and direction of rotation.
14.2 QDEC main features
• Three sets of QDEC are available
• The clock source of QDEC can be 32K (f32k_clk) or 32M (xclk). It is recommended to select 32M as the clock
source during normal operation, and 32K is recommended when entering sleep mode and wish to be awakened
by QDEC.
• Supports 5-digit frequency division value, which can be divided from 1 to 32.
• 16-bit pulse count range (-32768~32767 pulse/sample)
• 12 configurable sample periods (32us~131ms per sample at 1MHz)
• 16-bit configurable report period (0~65535 sample/report)
• Built-in a LED function that can flash with sampling (LED on/off 0~511 us/sample)
• Interrupt can be configured (sample interrupt, report interrupt, error interrupt, overflow interrupt)
• Can be configured as a wake-up source for PDS (clock source needs to be configured as 32k)
BL702/704/706 Reference Manual
262/ 375
@2021 Bouffalo Lab