<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># Copyright 2023 Dual Tachyon
# https://github.com/DualTachyon
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

[SARADC]
@ = 0x400BA000, 0x800

CFG = 0x0000
&gt; CH_SEL, 0, 15

&gt; AVG, 16, 2
= 1_SAMPLE, 0
= 2_SAMPLE, 1
= 4_SAMPLE, 2
= 8_SAMPLE, 3

&gt; CONT, 18, 1
= SINGLE, 0
= CONTINUOUS, 1

&gt; SMPL_SETUP, 19, 3
= 1_CYCLE, 0
= 2_CYCLE, 1
= 4_CYCLE, 2
= 8_CYCLE, 3
= 16_CYCLE, 4
= 32_CYCLE, 5
= 64_CYCLE, 6
= 128_CYCLE, 7

&gt; MEM_MODE, 22, 1
= FIFO, 0
= CHANNEL, 1

&gt; SMPL_CLK, 23, 1
= EXTERNAL, 0
= INTERNAL, 1

&gt; SMPL_WIN, 24, 3
= 1_CYCLE, 0
= 3_CYCLE, 1
= 5_CYCLE, 2
= 7_CYCLE, 3
= 9_CYCLE, 4
= 11_CYCLE, 5
= 13_CYCLE, 6
= 15_CYCLE, 7

&gt; ADC_EN, 27, 1
= DISABLE, 0
= ENABLE, 1

&gt; ADC_TRIG, 28, 1
= CPU, 0
= EXTERNAL, 1

&gt; DMA_EN, 29, 1
= DISABLE, 0
= ENABLE, 1

START = 0x0004
&gt; START, 0, 1
= DISABLE, 0
= ENABLE, 1

&gt; SOFT_RESET, 2, 1
= ASSERT, 0
= DEASSERT, 1

IE = 0x0008
&gt; CHx_EOC, 0, 16
= NONE, 0x0000
= ALL, 0xFFFF

&gt; FIFO_FULL, 16, 1
= DISABLE, 0
= ENABLE, 1

&gt; FIFO_HFULL, 17, 1
= DISABLE, 0
= ENABLE, 1

IF = 0x000C
&gt; CHx_EOC, 0, 16

&gt; FIFO_FULL, 16, 1
= NOT_SET, 0
= SET, 1

&gt; FIFO_HFULL, 17, 1
= NOT_SET, 0
= SET, 1

CH0 = 0x0010

EXTTRIG_SEL = 0x00B0

CALIB_OFFSET = 0x00F0
&gt; OFFSET, 0, 8
&gt; VALID, 16, 1
= NO, 0
= YES, 1

CALIB_KD = 0x00F4
&gt; KD, 0, 8
&gt; VALID, 16, 1
= NO, 0
= YES, 1

[ADC_CHx]
$ = ADC_Channel_t

STAT = 0x0000
&gt; EOC, 0, 1
= NOT_COMPLETE, 0
= COMPLETE, 1

DATA = 0x0004
&gt; DATA, 0, 12
&gt; NUM, 12, 4

</pre></body></html>