15.3.6 Example
The example below (illustrated in
Figure 15.3 TIMER0 Overflow Starting ADC0 Single Conversions Through PRS Channel 5. on page
) 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 TIMER0 as input to PRS channel 5.
• Set SIGSEL in PRS_CH5_CTRL to select the overflow signal (TIMER0OF 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.
PRS
TIMER0
ADC0
ch0
ch1
ch2
ch3
ch4
ch5
ch6
ch7
Start single conv.
Overflow
Figure 15.3. TIMER0 Overflow Starting ADC0 Single Conversions Through PRS Channel 5.
15.4 Register Map
The offset register address is relative to the registers base address.
Offset
Name
Type
Description
W1
RW
RW
I/O Routing Pin Enable Register
RW
RW
RW
RW
RW
RW
R
RW
...
RW
RW
Reference Manual
PRS - Peripheral Reflex System
silabs.com
| Building a more connected world.
Rev. 1.1 | 425