RM0082
LS_Analog to digital convertor (ADC)
Doc ID 018672 Rev 1
649/844
HIGH RESOLUTION = 1
The AVERAGE_REG bit assignments allocate 16 bits for the conversion data.
29.5.3 SCAN
RATE
register
The SCAN RATE register is used only if the ADC is working in Enhanced mode. In this case
it defines the number of APB Clock cycles that will be inserted in between the beginning of
the current conversion and the start of the next one. The bit assignment are given
in
. Taking in account of the number of channels that are enabled and the value of
this register is possible to calculate the real scan rate. To be noted that, is the value of the
register do not cover one conversion time, the next conversion will start immediately when
the previous one is ended.
Table 579.
SCAN RATE register bit assignments
29.5.4 ADC_CLK_REG
register
The ADC_CLK_REG is a RW register which is used to program the frequency of ADC clock.
The ADC_CLK_REG bit assignments are given in
.
Note:
This register can be written to only if both bit[8], CONVERSION READY, and bit[0],
ENABLE, of the same register are set to 1‘b0.
The duty cycle of ADC clock results then from the ratio of the two values, while the
frequency of ADC clock is the APB clock frequency divided by the sum of the same two
values.
3‘b100
16
bits [13:4]
bits [3:0]
3’b101
32
bits [14:5]
bits [4:0]
3‘b110
64
bits [15:6]
bits [5:0]
3‘b111
128
bits [16:7]
bits [6:0]
Table 578.
Conversion data bits position in AVERAGE_REG (High Resolution = 1)
ADC_STATUS_REG[7:5]
Number of samples
Integer part of the
result
Fractional part of the
result
Bit
Name
Reset value
Type
Description
[31:00] SCAN_RATE
32’h0000_0000
RW
Number of APB Clock cycles inserted in
between two conversion start in enhanced
mode.
Table 580.
ADC_CLK_REG register bit assignments
Bit
Name
Reset
value
Type
Description
[15:08]
-
2’h0
-
reserved
[07:04]
ADC_CLK_H
4’h0
RW
High state (as number of APB clock periods).
[03:00]
ADC_CLK_L
4’h0
RW
Low state (as number of APB clock periods).