Skip to content

Commit 67f8b59

Browse files
committed
Added Generic D11D14AS (20-pin SOIC) variant.
1 parent 76b4aa9 commit 67f8b59

File tree

9 files changed

+1332
-0
lines changed

9 files changed

+1332
-0
lines changed

boards.txt

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,91 @@ d11c14a.menu.usb.none.build.usbcom=USB_DISABLED
691691
d11c14a.menu.usb.none.build.pid=0x0856
692692

693693

694+
# Generic D11D14AS (SOIC-20)
695+
d11d14as.name=Generic D11D14AS
696+
d11d14as.vid.0=0x16D0
697+
d11d14as.pid.0=0x0557
698+
d11d14as.vid.1=0x16D0
699+
d11d14as.pid.1=0x0856
700+
d11d14as.vid.2=0x16D0
701+
d11d14as.pid.2=0x0B41
702+
d11d14as.vid.3=0x16D0
703+
d11d14as.pid.3=0x0B40
704+
d11d14as.vid.4=0x16D0
705+
d11d14as.pid.4=0x0A0C
706+
d11d14as.vid.5=0x16D0
707+
d11d14as.pid.5=0x0856
708+
d11d14as.build.mcu=cortex-m0plus
709+
d11d14as.build.f_cpu=48000000L
710+
d11d14as.build.usb_product="D11D14AS"
711+
d11d14as.build.usb_manufacturer="MattairTech LLC"
712+
d11d14as.build.board=SAMD_ZERO
713+
d11d14as.build.core=arduino
714+
d11d14as.build.variant=Generic_D11D14AS
715+
d11d14as.build.variant_system_lib=
716+
d11d14as.build.vid=0x16D0
717+
d11d14as.upload.protocol=sam-ba
718+
d11d14as.bootloader.tool=arduino:openocd
719+
d11d14as.menu.clock.internal_usb=INTERNAL_USB_CALIBRATED_OSCILLATOR
720+
d11d14as.menu.clock.internal_usb.build.clockconfig=CLOCKCONFIG_INTERNAL_USB
721+
d11d14as.menu.clock.internal=INTERNAL_OSCILLATOR
722+
d11d14as.menu.clock.internal.build.clockconfig=CLOCKCONFIG_INTERNAL
723+
d11d14as.menu.clock.crystal_32k=32KHZ_CRYSTAL
724+
d11d14as.menu.clock.crystal_32k.build.clockconfig=CLOCKCONFIG_32768HZ_CRYSTAL
725+
d11d14as.menu.clock.crystal_hs=HIGH_SPEED_CRYSTAL
726+
d11d14as.menu.clock.crystal_hs.build.clockconfig=CLOCKCONFIG_HS_CRYSTAL
727+
d11d14as.build.extra_flags=-D__SAMD11D14AS__ {build.usb_flags}
728+
d11d14as.build.ldscript=flash_16KB.ld
729+
d11d14as.build.openocdscript=openocd_scripts/SAMD11D14AS.cfg
730+
d11d14as.bootloader.file=zero/binaries/sam_ba_Generic_D11D14AS_SAMD11D14AS.bin
731+
d11d14as.menu.bootloader.4kb=4KB_BOOTLOADER
732+
d11d14as.menu.bootloader.4kb.build.bootloader_size=__4KB_BOOTLOADER__
733+
d11d14as.menu.bootloader.4kb.build.ldscript_path=linker_scripts/gcc/4KB_Bootloader
734+
d11d14as.menu.bootloader.4kb.upload.tool=MattairTech_Arduino:bossac
735+
d11d14as.menu.bootloader.4kb.upload.use_1200bps_touch=true
736+
d11d14as.menu.bootloader.4kb.upload.wait_for_upload_port=true
737+
d11d14as.menu.bootloader.4kb.upload.native_usb=true
738+
d11d14as.menu.bootloader.4kb.upload.maximum_size=12288
739+
d11d14as.menu.bootloader.0kb=NO_BOOTLOADER
740+
d11d14as.menu.bootloader.0kb.build.bootloader_size=__NO_BOOTLOADER__
741+
d11d14as.menu.bootloader.0kb.build.ldscript_path=linker_scripts/gcc/No_Bootloader
742+
d11d14as.menu.bootloader.0kb.upload.tool=arduino:openocd
743+
d11d14as.menu.bootloader.0kb.upload.use_1200bps_touch=false
744+
d11d14as.menu.bootloader.0kb.upload.wait_for_upload_port=false
745+
d11d14as.menu.bootloader.0kb.upload.native_usb=false
746+
d11d14as.menu.bootloader.0kb.upload.maximum_size=16384
747+
d11d14as.menu.serial.one_uart=ONE_UART_ONE_WIRE_ONE_SPI
748+
d11d14as.menu.serial.one_uart.build.serialcom_uart=ONE_UART
749+
d11d14as.menu.serial.one_uart.build.serialcom_wire=ONE_WIRE
750+
d11d14as.menu.serial.one_uart.build.serialcom_spi=ONE_SPI
751+
d11d14as.menu.serial.no_uart=NO_UART_ONE_WIRE_ONE_SPI
752+
d11d14as.menu.serial.no_uart.build.serialcom_uart=NO_UART
753+
d11d14as.menu.serial.no_uart.build.serialcom_wire=ONE_WIRE
754+
d11d14as.menu.serial.no_uart.build.serialcom_spi=ONE_SPI
755+
d11d14as.menu.serial.two_uart=TWO_UART_ONE_WIRE_NO_SPI
756+
d11d14as.menu.serial.two_uart.build.serialcom_uart=TWO_UART
757+
d11d14as.menu.serial.two_uart.build.serialcom_wire=ONE_WIRE
758+
d11d14as.menu.serial.two_uart.build.serialcom_spi=NO_SPI
759+
d11d14as.menu.usb.cdc=CDC_ONLY
760+
d11d14as.menu.usb.cdc.build.usbcom=CDC_ONLY
761+
d11d14as.menu.usb.cdc.build.pid=0x0557
762+
d11d14as.menu.usb.cdc_hid=CDC_HID
763+
d11d14as.menu.usb.cdc_hid.build.usbcom=CDC_HID
764+
d11d14as.menu.usb.cdc_hid.build.pid=0x0856
765+
d11d14as.menu.usb.withcdc=WITH_CDC
766+
d11d14as.menu.usb.withcdc.build.usbcom=WITH_CDC
767+
d11d14as.menu.usb.withcdc.build.pid=0x0B41
768+
d11d14as.menu.usb.hid=HID_ONLY
769+
d11d14as.menu.usb.hid.build.usbcom=HID_ONLY
770+
d11d14as.menu.usb.hid.build.pid=0x0B40
771+
d11d14as.menu.usb.nocdc=WITHOUT_CDC
772+
d11d14as.menu.usb.nocdc.build.usbcom=WITHOUT_CDC
773+
d11d14as.menu.usb.nocdc.build.pid=0x0A0C
774+
d11d14as.menu.usb.none=USB_DISABLED
775+
d11d14as.menu.usb.none.build.usbcom=USB_DISABLED
776+
d11d14as.menu.usb.none.build.pid=0x0856
777+
778+
694779
# MattairTech Core for Arduino/Genuino Zero (Autodetect Port)
695780
arduino_zero.name=Arduino/Genuino Zero (Autodetect Port)
696781
arduino_zero.bootloader.file=zero/binaries/sam_ba_arduino_zero_SAMD21G18A.bin

variants/Generic_D11D14AS/README.md

Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
# Generic ATsamD11D14AS
2+
3+
```
4+
===================================== ATsamD11D14AS ===================================
5+
Other COM PWM Analog INT Arduino* Arduino* Analog INT PWM COM Other
6+
=========================================================================================
7+
1-------------------
8+
TCC01 * * 5 | A5 A4 | 4 * * TCC00 REFB
9+
SS TCC02 * 6 | A6 A3 | 3 * REFA
10+
MISO TCC03 * * 7 | A7 A2 | 2 * * DAC
11+
Xin32/Xin 8 | A8 (XIN) Vdd |
12+
Xout32/Xout 9 | A9 (XOUT) Gnd |
13+
MOSI/TX2 * NMI 14 | A14 A25 | 25 USB D+
14+
SCK/RX2 TC11 * * 15 | A15 A24 | 24 USB D-
15+
TC10 * 16 | A16 A31 | 31 * TC21 RX1 SWDIO
16+
SDA * 22 | A22 A30 | 30 TC20 TX1 SWDCLK
17+
SCL 23 | A23 RST/A28 | 28 BOOT
18+
-------------------
19+
20+
* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port
21+
pin number printed on the chip above is also used in Arduino (but without the 'A') for
22+
all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.).
23+
When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the
24+
top left pin (A5). PIN_MAP_COMPACT uses less RAM.
25+
* When USB CDC is enabled, Serial refers to SerialUSB, otherwise it refers to Serial1.
26+
* Tone available on TC2.
27+
* Leave pin A30 floating (or use external pullup) during reset.
28+
* DO NOT connect voltages higher than 3.3V!
29+
```
30+
31+
32+
## Pins descriptions for Generic ATsamD11D14AS
33+
34+
### PIN_MAP_STANDARD
35+
```
36+
============================================================================================================================================
37+
Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment)
38+
--------|-------|-----------------------|-------------------------------------------------------------------------------------------
39+
0 | ---- | NOT A PIN | NOT A PIN
40+
1 | ---- | NOT A PIN | NOT A PIN
41+
2 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT
42+
3 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1]
43+
4 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0]
44+
5 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1]
45+
6 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2]
46+
7 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3]
47+
8 | PA08 | Xin32 / Xin | Xin32
48+
9 | PA09 | Xout32 / Xout | Xout32
49+
10 | ---- | NOT A PIN | NOT A PIN
50+
11 | ---- | NOT A PIN | NOT A PIN
51+
12 | ---- | NOT A PIN | NOT A PIN
52+
13 | ---- | NOT A PIN | NOT A PIN
53+
14 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0]
54+
15 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1]
55+
16 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6]
56+
17 | ---- | NOT A PIN | NOT A PIN
57+
18 | ---- | NOT A PIN | NOT A PIN
58+
19 | ---- | NOT A PIN | NOT A PIN
59+
20 | ---- | NOT A PIN | NOT A PIN
60+
21 | ---- | NOT A PIN | NOT A PIN
61+
22 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4]
62+
23 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5]
63+
24 | PA24 | USB_NEGATIVE | USB/DM
64+
25 | PA25 | USB_POSITIVE | USB/DP
65+
26 | ---- | NOT A PIN | NOT A PIN
66+
27 | ---- | NOT A PIN | NOT A PIN
67+
28 | PA28 | Reset | Reset, BOOT (double tap bootloader entry)
68+
29 | ---- | NOT A PIN | NOT A PIN
69+
30 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot
70+
31 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO
71+
============================================================================================================================================
72+
```
73+
74+
### PIN_MAP_COMPACT
75+
```
76+
============================================================================================================================================
77+
Arduino | Port | Alternate Function | Comments (! means not used with this peripheral assignment)
78+
--------|-------|-----------------------|-------------------------------------------------------------------------------------------
79+
0 | PA02 | DAC | EIC/EXTINT[2] ADC/AIN[0] PTC/Y[0] DAC/VOUT
80+
1 | PA03 | REFA | !EIC/EXTINT[3] REF/ADC/VREFA REF/DAC/VREFA ADC/AIN[1] PTC/Y[1]
81+
2 | PA04 | REFB / TCC00 | EIC/EXTINT[4] REF/ADC/VREFB ADC/AIN[4] AC/AIN[0] PTC/Y[2] !SERCOM0/PAD[2] !SERCOM0/PAD[0] !TC1/WO[0] TCC0/WO[0]
82+
3 | PA05 | TCC01 | EIC/EXTINT[5] ADC/AIN[3] AC/AIN[1] PTC/Y[3] !SERCOM0/PAD[3] !SERCOM0/PAD[1] !TC1/WO[1] TCC0/WO[1]
83+
4 | PA06 | SS (unused) / TCC02 | !EIC/EXTINT[6] ADC/AIN[4] AC/AIN[2] PTC/Y[4] SERCOM0/PAD[0] !SERCOM0/PAD[2] !TC2/WO[0] TCC0/WO[2]
84+
5 | PA07 | MISO / TCC03 | EIC/EXTINT[7] ADC/AIN[5] AC/AIN[3] PTC/Y[5] SERCOM0/PAD[1] !SERCOM0/PAD[3] !TC2/WO[1] TCC0/WO[3]
85+
6 | PA08 | Xin32 / Xin | Xin32
86+
7 | PA09 | Xout32 / Xout | Xout32
87+
8 | PA14 | MOSI / TX2 | EIC/NMI ADC/AIN[6] PTC/X[0] PTC/Y[6] SERCOM0/PAD[0] !SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[0]
88+
9 | PA15 | SCK / RX2 / TC11 | EIC/EXTINT[1] ADC/AIN[7] PTC/X[1] PTC/Y[7] SERCOM0/PAD[1] !SERCOM2/PAD[1] TC1/WO[1] !TCC0/WO[1]
89+
10 | PA16 | TC10 | EIC/EXTINT[0] PTC/X[4] PTC/Y[10] !SERCOM1/PAD[2] !SERCOM2/PAD[2] TC1/WO[0] !TCC0/WO[6]
90+
11 | PA22 | SDA | EIC/EXTINT[6] PTC/X[6] PTC/Y[12] !SERCOM1/PAD[0] SERCOM2/PAD[0] !TC1/WO[0] !TCC0/WO[4]
91+
12 | PA23 | SCL | !EIC/EXTINT[7] PTC/X[7] PTC/Y[13] !SERCOM1/PAD[1] SERCOM2/PAD[1] !TC1/WO[1] !TCC0/WO[5]
92+
13 | PA24 | USB_NEGATIVE | USB/DM
93+
14 | PA25 | USB_POSITIVE | USB/DP
94+
15 | PA28 | Reset | Reset, BOOT (double tap bootloader entry)
95+
16 | PA30 | TX1 / TC20 / SWD CLK | !EIC/EXTINT[2] !SERCOM1/PAD[0] SERCOM1/PAD[2] TC2/WO[0] !TCC0/WO[2] SWD CLK, leave floating during boot
96+
17 | PA31 | RX1 / TC21 / SWD IO | EIC/EXTINT[3] !SERCOM1/PAD[1] SERCOM1/PAD[3] TC2/WO[1] !TCC0/WO[3] SWD IO
97+
============================================================================================================================================
98+
99+
* Most pins can be used for more than one function. When using PIN_MAP_STANDARD, the port
100+
pin number printed on the chip above is also used in Arduino (but without the 'A') for
101+
all of the supported functions (ie: digitalRead(), analogRead(), analogWrite(), etc.).
102+
When using PIN_MAP_COMPACT, the Arduino numbering is sequential starting from 0 at the
103+
top left pin (A5). PIN_MAP_COMPACT uses less RAM.
104+
* NOT A PIN means the Arduino pin number is not mapped to a physical pin.
105+
* Pins 24 and 25 are in use by USB (USB_NEGATIVE and USB_POSITIVE).
106+
* The tone library uses TC2.
107+
* Leave pin A30 floating (or use external pullup) during reset.
108+
```
109+
110+
111+
## Board Configuration Notes
112+
113+
* **Crystals**
114+
* Either a 32.768KHz crystal or a high speed crystal can be used.
115+
* The bootloader does not use an external crystal by default. Double-tap the reset button to enter manually.
116+
117+
* **GPIO**
118+
* All pins (including analog) support INPUT, OUTPUT, INPUT_PULLUP, and INPUT_PULLDOWN.
119+
* Each pin can source or sink a maximum of 7 mA (when PER_ATTR_DRIVE_STRONG is set for the pin, enabled by default).
120+
* Internal pull-up and pull-down resistors of 20-60 Kohms (40Kohm typ., disconnected by default).
121+
122+
* **Analog Inputs**
123+
* 8 pins can be configured as ADC analog inputs.
124+
* Each pin measures from ground to 3.3 volts by default.
125+
* Each pin provides 10 bits of resolution (1024 values) by default.
126+
* 12-bit resolution supported by using the analogReadResolution() function.
127+
* The upper end of the measurement range can be changed using the analogReference() function.
128+
* A reference voltage can be connected to REF.
129+
130+
* **DAC**
131+
* One analog output is available on pin 2.
132+
* Provides a 10-bit voltage output with the analogWrite() function.
133+
134+
* **PWM**
135+
* 8 pins can be configured as PWM outputs.
136+
* Each pin provides 8 bits of resolution (256 values) by default.
137+
* 12-bit resolution supported by using the analogWriteResolution() function.
138+
139+
* **External Interrupts**
140+
* 8 pins can be configured with external interrupts.
141+
142+
* **SERCOM**
143+
* 3 SERCOM are available.
144+
* Up to 2 UART instances
145+
* 1 SPI instance
146+
* 1 WIRE (I2C) instance
147+
148+
149+
150+
## PinDescription table format
151+
152+
### Note that a new column (GCLKCCL) was added for 1.6.8-beta-b0.
153+
MATTAIRTECH_ARDUINO_SAMD_VARIANT_COMPLIANCE in variant.h is used to track versions.
154+
If using board variant files with the old format, the new core will still read the
155+
table the old way, losing any new features introduced by the new column. Additionally,
156+
new definitions have been added for L21 and C21 support.
157+
158+
### Each pin can have multiple functions.
159+
The PinDescription table describes how each of the pins can be used by the Arduino
160+
core. Each pin can have multiple functions (ie: ADC input, digital output, PWM,
161+
communications, etc.), and the PinDescription table configures which functions can
162+
be used for each pin. This table is mainly accessed by the pinPeripheral function in
163+
wiring_private.c, which is used to attach a pin to a particular peripheral function.
164+
The communications drivers (ie: SPI, I2C, and UART), analogRead(), analogWrite(),
165+
analogReference(), attachInterrupt(), and pinMode() all call pinPeripheral() to
166+
verify that the pin can perform the function requested, and to configure the pin for
167+
that function. Most of the contents of pinMode() are now in pinPeripheral().
168+
169+
### Pin Mapping
170+
There are different ways that pins can be mapped. Typically, there is no relation
171+
between the arduino pin number used, and the actual port pin designator. Thus, the
172+
pcb must be printed with the arduino numbering, otherwise, if the port pin is printed,
173+
a cross reference table is needed to find the arduino pin number. However, this results
174+
in the least amount of space used by the table. Another method, used by default by the
175+
MT-D21E and MT-D11, maps Arduino pin numbers to the actual port pin number (ie: Arduino
176+
pin 28 = Port A28). This works well when there is only one port (or if the PORTB pins
177+
are used for onboard functions and not broken out). PIO_NOT_A_PIN entries must be added
178+
for pins that are used for other purposes or for pins that do not exist (especially the
179+
D11), so some FLASH space may be wasted. For an example of both types, see variant.cpp
180+
from the MT-D11 variant. The MT-D21J combines both methods, using the actual port pin
181+
designators from both PORTA and PORTB for arduino numbers 0-31 (ie: B1=1, A2=2), then
182+
using arduino numbering only above 31. For 0-31 only one pin from PORTA or PORTB can be
183+
used, leaving the other pin for some number above 31.
184+
185+
**See [WVariant.h](https://github.com/mattairtech/ArduinoCore-samd/tree/master/cores/arduino/WVariant.h) for the definitions used in the table.**
186+
187+
### Port
188+
This is the port (ie: PORTA).
189+
190+
### Pin
191+
This is the pin (bit) within the port. Valid values are 0-31.
192+
193+
### PinType
194+
This indicates what peripheral function the pin can be attached to. In most cases,
195+
this is PIO_MULTI, which means that the pin can be anything listed in the PinAttribute
196+
field. It can also be set to a specific peripheral. In this case, any attempt to
197+
configure the pin (using pinPeripheral or pinMode) as anything else will fail (and
198+
pinPeripheral will return -1). This can be used to prevent accidental re-configuration
199+
of a pin that is configured for only one function (ie: USB D- and D+ pins). If a pin
200+
is not used or does not exist, PIO_NOT_A_PIN must be entered in this field. See
201+
WVariant.h for valid entries. These entries are also used as a parameter to
202+
pinPeripheral() with the exception of PIO_NOT_A_PIN and PIO_MULTI. The pinMode function
203+
now calls pinPeripheral() with the desired mode. Note that this field is not used to
204+
select between the two peripherals possible with each of the SERCOM and TIMER functions.
205+
PeripheralAttribute is now used for this.
206+
207+
### PeripheralAttribute:
208+
This is an 8-bit bitfield used for various peripheral configuration. It is primarily
209+
used to select between the two peripherals possible with each of the SERCOM and TIMER
210+
functions. TIMER pins are individual, while SERCOM uses a group of two to four pins.
211+
This group of pins can span both peripherals. For example, pin 19 (SPI1 SCK) on the
212+
MT-D21E uses PER_ATTR_SERCOM_ALT while pin 22 (SPI1 MISO) uses PER_ATTR_SERCOM_STD.
213+
Both TIMER and SERCOM can exist for each pin. This bitfield is also used to set the
214+
pin drive strength. In the future, other attributes (like input buffer configuration)
215+
may be added. Starting with 1.6.8, the ADC instance on the C21 (there are two) is also
216+
selected here. See WVariant.h for valid entries.
217+
218+
### PinAttribute
219+
This is a 32-bit bitfield used to list all of the valid peripheral functions that a
220+
pin can attach to. This includes GPIO functions like PIN_ATTR_OUTPUT. Certain
221+
attributes are shorthand for a combination of other attributes. PIN_ATTR_DIGITAL
222+
includes all of the GPIO functions, while PIN_ATTR_TIMER includes both
223+
PIN_ATTR_TIMER_PWM and PIN_ATTR_TIMER_CAPTURE (capture is not used yet).
224+
PIN_ATTR_ANALOG is an alias to PIN_ATTR_ANALOG_ADC. This bitfield is useful for
225+
limiting a pin to only input related functions or output functions. This allows a pin
226+
to have a more flexible configuration, while restricting the direction (ie: to avoid
227+
contention). See WVariant.h for valid entries.
228+
229+
### TCChannel
230+
This is the TC/TCC channel (if any) assigned to the pin. Some TC channels are available
231+
on multiple pins. In general, only one pin should be configured in the pinDescription
232+
table per TC channel. Starting with 1.6.8, the timer type is now encoded in this column
233+
to support the L21 and C21, which use TC numbers starting at 0 (rather than 3 as on the
234+
D21). See WVariant.h for valid entries.
235+
236+
### ADCChannelNumber
237+
This is the ADC channel (if any) assigned to the pin. The C21 has two ADC instances,
238+
which is selected in the PeripheralAttribute column. See WVariant.h for valid entries.
239+
240+
### ExtInt
241+
This is the interrupt (if any) assigned to the pin. Some interrupt numbers are
242+
available on multiple pins. In general, only one pin should be configured in the
243+
pinDescription table per interrupt number. Thus, for example, if an interrupt was
244+
needed on pin 2, EXTERNAL_INT_2 can be moved from pin 18. See WVariant.h for valid
245+
entries.
246+
247+
### GCLKCCL
248+
This column was added in 1.6.8-beta-b0. It is not yet used. It will eventually support
249+
the Analog Comparators (AC), the Configurable Custom Logic (CCL) units of the L21 and
250+
C21, and the GCLK outputs (inputs).

0 commit comments

Comments
 (0)