Joined: Sun. Feb 18, 2018
Location: Germany, Bavaria
Hello from Germany!
Since 2 month, I have been programming the SAMD10 D13 MCU, as the ARM CORTEX
world is absolutely new to me. I do not use ASF or CMSIS, as I want to prevent huge code,
and I want to be independant. Many things like GPIOs, TC1 and TC2, UART work very well, but
the ADC annoys me since some days. Things like averaging, oversampling are switched off. I use
single ended mode, 12 bit,right adjusted and VREFA=2.5V. The huge offset of 512 (all numbers are decimal)
could be compensated by offset correction. But an input voltage of 2.5 V does not cause 4095 as ADC value,
but something like 1300. 3.3 V cause about 2050. This means, gain is much too low, but even a gain
correction with data 0xFFF is not sufficient. A very critical item in my case is the calibration register,
requiring correction data from the NVM area 0x806020 von Bit 27-37, being address 0x806023 Bit 3 to
0x806024, bit5. I copy the NWM correction 11 bits as follows:
Addr 0x806023 Bit3 -> register CALIBRATION bit 0
Addr 0x806023 Bit4 -> register CALIBRATION bit 1
Addr 0x806023 Bit5 -> register CALIBRATION bit 2
Addr 0x806023 Bit6 -> register CALIBRATION bit 3
Addr 0x806023 Bit7 -> register CALIBRATION bit 4
Addr 0x806024 Bit0 -> register CALIBRATION bit 5
Addr 0x806024 Bit1 -> register CALIBRATION bit 6 and so on.
But the result is, that the ADC behaves like a random generator, meaning,
a copy of wrong bits. Therefore I do not use it at present. What is wrong,
referring to my train of thoughts?
This topic has a solution. Jump to the solution.
Last Edited: Tue. Feb 27, 2018 - 08:28 AM