...the world's most energy friendly microcontrollers
2016-04-28 - Giant Gecko Family - d0053_Rev1.20
168
www.silabs.com
Module
Reflex Input
Input Format
Async Support
S1 input
Level
Yes
Start scan
Pulse/Level
Yes
Decoder Bit 0
Level
Yes
Decoder Bit 1
Level
Yes
Decoder Bit 2
Level
Yes
LESENSE
Decoder Bit 3
Level
Yes
Note
It is possible to output prs channel 0 - channel 3 onto the GPIO by setting CH0PEN,
CH1PEN, CH2PEN, or CH3PEN in the PRS_ROUTE register.
13.3.5 Example
The example below (illustrated in Figure 13.2 (p. 168) ) shows how to set up ADC0 to start single
conversions every time TIMER0 overflows (one HFPERCLK cycle high pulse), using PRS channel 5:
• Set SOURCESEL in PRS_CH5_CTRL to 0b011100 to select TIMER0 as input to PRS channel 5.
• Set SIGSEL in PRS_CH5_CTRL to 0b001 to select the overflow signal (from TIMER0).
• Configure ADC0 with the desired conversion set-up.
• Set SINGLEPRSEN in ADC0_SINGLECTRL to 1 to enable single conversions to be started by a high
PRS input signal.
• Set SINGLEPRSSEL in ADC0_SINGLECTRL to 0x5 to select PRS channel 5 as input to start the
single conversion.
• Start TIMER0 with the desired TOP value, an overflow PRS signal is output automatically on overflow.
Note that the ADC results needs to be fetched either by the CPU or DMA.
Figure 13.2. TIMER0 overflow starting ADC0 single conversions through PRS channel 5.
PRS
TIMER0
ADC0
ch0
ch1
ch2
ch3
ch4
ch5
ch6
ch7
St art single conv.
Overflow
Summary of Contents for Giant Gecko EFM32GG
Page 842: ......