Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crocker <dcrocker@eschertech.com>2020-09-24 17:58:08 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-09-24 17:58:08 +0300
commit5507c7a68ec7ff47566c6ae697143f3855546e85 (patch)
treef8a95496ab59f6f4a5f3a38e9b0b41005faf47c4 /src/Duet3Mini
parent8f5b63e328b6a332005e855afdec8c7addd8ba89 (diff)
Changes for new CoreN2G and to support v0.4 Duet 3 Mini prototype
Diffstat (limited to 'src/Duet3Mini')
-rw-r--r--src/Duet3Mini/Pins_Duet3Mini.h221
1 files changed, 201 insertions, 20 deletions
diff --git a/src/Duet3Mini/Pins_Duet3Mini.h b/src/Duet3Mini/Pins_Duet3Mini.h
index e28b6f02..6c1785d0 100644
--- a/src/Duet3Mini/Pins_Duet3Mini.h
+++ b/src/Duet3Mini/Pins_Duet3Mini.h
@@ -50,7 +50,7 @@ constexpr uint32_t IAP_IMAGE_START = 0x20030000;
#define HAS_VREF_MONITOR 1
#ifdef DUET3MINI_V04
-#define SUPPORT_CAN_EXPANSION 1
+#define SUPPORT_CAN_EXPANSION 0 //****TEMP!
#else
#define SUPPORT_CAN_EXPANSION 0
#endif
@@ -125,9 +125,10 @@ constexpr unsigned int MaxTriggers = 16; // Maximum number of triggers
constexpr size_t MaxSpindles = 2; // Maximum number of configurable spindles
-constexpr size_t NumSerialChannels = 2; // The number of serial IO channels (USB and one auxiliary UART)
+constexpr size_t NumSerialChannels = 3; // The number of serial IO channels (USB and one auxiliary UART)
#define SERIAL_MAIN_DEVICE (serialUSB)
#define SERIAL_AUX_DEVICE (serialUart0)
+#define SERIAL_AUX2_DEVICE (serialUart1)
// SerialUSB
constexpr Pin UsbVBusPin = PortBPin(6); // Pin used to monitor VBUS on USB port
@@ -198,12 +199,12 @@ constexpr uint32_t DriversBaudRate = 250000;
constexpr uint32_t TransferTimeout = 2; // any transfer should complete within 2 ticks @ 1ms/tick
constexpr uint32_t DefaultStandstillCurrentPercent = 75;
-#ifdef DUET3MINI_V02
+#if defined(DUET3MINI_V02)
constexpr float DriverSenseResistor = 0.05 + 0.02; // in ohms
-#endif
-#ifdef DUET3MINI_V04
+#elif defined(DUET3MINI_V04)
constexpr float DriverSenseResistor = 0.056 + 0.02; // in ohms
#endif
+
constexpr float DriverVRef = 180.0; // in mV
constexpr float DriverFullScaleCurrent = DriverVRef/DriverSenseResistor; // in mA
constexpr float DriverCsMultiplier = 32.0/DriverFullScaleCurrent;
@@ -215,38 +216,49 @@ constexpr Pin TEMP_SENSE_PINS[NumThermistorInputs] = { PortCPin(0), PortCPin(1),
constexpr Pin VssaSensePin = PortBPin(4);
constexpr Pin VrefSensePin = PortBPin(5);
-// Default thermistor parameters
-constexpr float BED_R25 = 100000.0;
-constexpr float BED_BETA = 3988.0;
-constexpr float BED_SHC = 0.0;
-constexpr float EXT_R25 = 100000.0;
-constexpr float EXT_BETA = 4388.0;
-constexpr float EXT_SHC = 0.0;
-
// Thermistor series resistor value in Ohms
constexpr float DefaultThermistorSeriesR = 2200.0;
constexpr float MinVrefLoadR = (DefaultThermistorSeriesR / 4) * 4700.0/((DefaultThermistorSeriesR / 4) + 4700.0);
// there are 4 temperature sensing channels and a 4K7 load resistor
-// Digital pins the 31855s have their select lines tied to
+// Digital pins that SPi devices have their select lines tied to
+#if defined(DUET3MINI_V02)
constexpr Pin SpiTempSensorCsPins[] = { PortCPin(10), PortCPin(7) }; // SPI0_CS1, SPI0_CS2
+#elif defined(DUET3MINI_V04)
+constexpr Pin SpiTempSensorCsPins[] = { PortDPin(11), PortCPin(7) }; // SPI0_CS1, SPI0_CS2
+#endif
// Pin that controls the ATX power on/off
constexpr Pin ATX_POWER_PIN = PortDPin(10); // aliased with io5.out
// Analogue pin numbers
+#if defined(DUET3MINI_V02)
constexpr Pin PowerMonitorVinDetectPin = PortBPin(8); // Vin monitor
+#elif defined(DUET3MINI_V04)
+constexpr Pin PowerMonitorVinDetectPin = PortCPin(3); // Vin monitor
+#endif
+
constexpr float PowerMonitorVoltageRange = 11.0 * 3.3; // We use an 11:1 voltage divider
#ifdef DEBUG
-constexpr Pin DiagPin = NoPin; // Diag pin is shared with SWD
+constexpr Pin DiagPin = NoPin; // Diag/status LED pin is shared with SWD
+constexpr Pin ActLedPin = NoPin; // Activity LED pin is shared with SWCLK
#else
-constexpr Pin DiagPin = PortAPin(31);
+constexpr Pin DiagPin = PortAPin(31); // Diag/status LED pin
+constexpr Pin ActLedPin = PortAPin(30); // Activity LED pin (Etherne Yellow LED on v0.2 board)
#endif
+
constexpr bool DiagOnPolarity = false;
+constexpr bool ActOnPolarity = false;
// SD cards
constexpr size_t NumSdCards = 2;
+
+#if defined(DUET3MINI_V02)
constexpr Pin SdCardDetectPins[NumSdCards] = { PortBPin(16), PortAPin(2) };
+#elif defined(DUET3MINI_V04)
+constexpr Pin SdCardDetectPins[NumSdCards] = { PortBPin(16), PortDPin(12) };
+#endif
+
constexpr Pin SdWriteProtectPins[NumSdCards] = { NoPin, NoPin };
constexpr Pin SdSpiCSPins[NumSdCards - 1] = { PortCPin(14) };
constexpr Pin SdMciPins[] = { PortAPin(20), PortAPin(21), PortBPin(18), PortBPin(19), PortBPin(20), PortBPin(21) };
@@ -263,12 +275,18 @@ constexpr uint32_t ExpectedSdCardSpeed = 15000000;
// The ST7567 specifies minimum clock cycle time 50ns i.e. 20MHz @ Vcc=3.3V
constexpr uint32_t LcdSpiClockFrequency = 2000000; // 2.0MHz
constexpr Pin LcdCSPin = PortCPin(6);
-constexpr Pin LcdA0Pin = PortCPin(3);
-constexpr Pin LcdBeepPin = PortAPin(22);
constexpr Pin EncoderPinA = PortCPin(11);
constexpr Pin EncoderPinB = PortDPin(1);
constexpr Pin EncoderPinSw = PortBPin(9);
+#if defined(DUET3MINI_V02)
+constexpr Pin LcdA0Pin = PortCPin(3);
+constexpr Pin LcdBeepPin = PortAPin(22);
+#elif defined(DUET3MINI_V04)
+constexpr Pin LcdA0Pin = PortAPin(2);
+constexpr Pin LcdBeepPin = PortAPin(9);
+#endif
+
// Neopixel output
constexpr Pin NeopixelOutPin = PortAPin(8);
constexpr GpioPinFunction NeopixelOutPinFunction = GpioPinFunction::H; // QSPI Data[0]
@@ -294,6 +312,18 @@ constexpr Pin Serial0TxPin = PortBPin(25);
constexpr Pin Serial0RxPin = PortBPin(24);
constexpr GpioPinFunction Serial0PinFunction = GpioPinFunction::D;
+// Serial on IO1
+constexpr uint8_t Serial1SercomNumber = 5;
+constexpr uint8_t Sercom1RxPad = 1;
+#define SERIAL1_ISR0 SERCOM5_0_Handler
+#define SERIAL1_ISR1 SERCOM5_1_Handler
+#define SERIAL1_ISR2 SERCOM5_2_Handler
+#define SERIAL1_ISR3 SERCOM5_3_Handler
+
+constexpr Pin Serial1TxPin = PortBPin(31);
+constexpr Pin Serial1RxPin = PortBPin(30);
+constexpr GpioPinFunction Serial1PinFunction = GpioPinFunction::D;
+
// Ethernet pins
constexpr Pin EthernetMacPins[] =
{
@@ -302,7 +332,12 @@ constexpr Pin EthernetMacPins[] =
};
constexpr GpioPinFunction EthernetMacPinsPinFunction = GpioPinFunction::L;
+#if defined(DUET3MINI_V02)
constexpr Pin EthernetPhyResetPin = PortCPin(21);
+#elif defined(DUET3MINI_V04)
+constexpr Pin EthernetPhyResetPin = PortCPin(17);
+#endif
+
constexpr Pin EthernetClockOutPin = PortAPin(16);
constexpr GpioPinFunction EthernetClockOutPinFunction = GpioPinFunction::M;
constexpr unsigned int EthernetClockOutGclkNumber = 2;
@@ -329,7 +364,7 @@ constexpr GpioPinFunction WiFiSpiSercomPinsMode = GpioPinFunction::D;
constexpr IRQn WiFiSpiSercomIRQn = SERCOM4_3_IRQn; // this is the SS Low interrupt, the only one we use
#define ESP_SPI_HANDLER SERCOM4_3_Handler
-constexpr Pin EspResetPin = PortCPin(21);
+constexpr Pin EspResetPin = EthernetPhyResetPin;
constexpr Pin EspEnablePin = PortCPin(20);
constexpr Pin EspDataReadyPin = PortAPin(18);
constexpr Pin SamTfrReadyPin = PortAPin(19);
@@ -339,7 +374,12 @@ constexpr Pin SamCsPin = PortAPin(14);
constexpr unsigned int SbcSpiSercomNumber = 0;
Sercom * const SbcSpiSercom = SERCOM0;
constexpr Pin SbcSSPin = PortAPin(6);
+#if defined(DUET3MINI_V02)
constexpr Pin SbcTfrReadyPin = PortBPin(7);
+#elif defined(DUET3MINI_V04)
+constexpr Pin SbcTfrReadyPin = PortAPin(3);
+#endif
+
constexpr Pin SbcSpiSercomPins[] = { PortAPin(4), PortAPin(5), PortAPin(6), PortAPin(7) };
constexpr GpioPinFunction SbcSpiSercomPinsMode = GpioPinFunction::D;
constexpr IRQn SbcSpiSercomIRQn = SERCOM0_3_IRQn; // this is the SS Low interrupt, the only one we use
@@ -353,7 +393,8 @@ bool LookupPinName(const char *pn, LogicalPin& lpin, bool& hardwareInverted) noe
// Aliases are separate by the , character.
// If a pin name is prefixed by ! then this means the pin is hardware inverted. The same pin may have names for both the inverted and non-inverted cases,
// for example the inverted heater pins on the expansion connector are available as non-inverted servo pins on a DueX.
-// Table of pin functions that we are allowed to use
+
+#if defined(DUET3MINI_V02)
constexpr PinDescription PinTable[] =
{
@@ -491,6 +532,146 @@ constexpr PinDescription PinTable[] =
#endif
};
+#elif defined(DUET3MINI_V04)
+
+constexpr PinDescription PinTable[] =
+{
+ // TC TCC ADC SERCOM in SERCOM out Exint Capability PinNames
+ // Port A
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA00 TMC UART TxD
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA01 TMC UART RxD
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA02 LCD A0
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA03 SBC data ready
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA04 SBC SPI MISO
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA05 SBC SPI SCLK
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA06 SBC SPI SS
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA07 SBC SPI MOSI
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA08 Neopixel output (QSPI MOSI)
+ { TcOutput::tc0_1, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA09 LCD buzzer
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA10 driver 0 diag
+ { TcOutput::tc1_1, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out4" }, // PA11 OUT4
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA12 Ethernet/WiFi SCLK (SERCOM4.1)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA13 Ethernet/WiFi MISO (SERCOM4.0)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA14 Ethernet/WiFi SS (SERCOM4.2)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA15 Ethernet/WiFi MOSI (SERCOM4.3)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA16 Ethernet GCLK2 out/WiFi RxD (SERCOM3.1)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA17 Ethernet/WiFi TxD (SERCOM3.0)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 2, PinCapability::none, nullptr }, // PA18 Ethernet/WiFi ESP_DATA_RDY
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA19 Ethernet/WiFi SAM_TRANSFER_RDY
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA20 SDHC CMD
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA21 SDHC CLK
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA22 driver 2 diag
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA23 driver 3 diag
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA24 USB
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA25 USB
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA26 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA27 driver 6 dir
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA28 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA29 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA30 swclk/ACT LED
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PA31 swdio/STATUS LED
+
+ // Port B
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB00 driver 5 dir
+ { TcOutput::tc7_1, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out6,laser,vfd" }, // PB01 OUT6
+ { TcOutput::none, TccOutput::tcc2_2F, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out5" }, // PB02 OUT5
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB03 driver 0 dir
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_6, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB04 VssaMon
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_7, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB05 VrefMon
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_8, SercomIo::none, SercomIo::none, 6, PinCapability::none, nullptr }, // PB06 Vbus
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_9, SercomIo::none, SercomIo::none, 7, PinCapability::ainr, "io3.in" }, // PB07 IO3_IN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB08 driver 1 diag
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 9, PinCapability::none, nullptr }, // PB09 ENC SW
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB10 driver 5 diag
+ { TcOutput::tc5_1, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out3" }, // PB11 OUT3
+ { TcOutput::none, TccOutput::tcc3_0F, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "io3.out" }, // PB12 IO3_OUT
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out2" }, // PB13 OUT2
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, nullptr }, // PB14 CAN Tx
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::read, nullptr }, // PB15 CAN Rx
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB16 SD CD
+ { TcOutput::tc6_1, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out0" }, // PB17 OUT0
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB18 SD DAT0
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB19 SD DAT1
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none , Nx, PinCapability::none, nullptr }, // PB20 SD DAT2
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB21 SD DAT3
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB22 crystal XIN1
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB23 crystal XOUT1
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::sercom2d, SercomIo::none, 8, PinCapability::read, "io0.in" }, // PB24 IO0_IN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::sercom2d, Nx, PinCapability::write, "io0.out" }, // PB25 IO0_OUT
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 12, PinCapability::read, "out4.tach" }, // PB26 OUT4 tacho
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 13, PinCapability::read, "out3.tach" }, // PB27 OUR3 tacho
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB28 driver 2 dir
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PB29 driver 1 dir
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::sercom5d, SercomIo::none, 14, PinCapability::read, "io1.in" }, // PB30 IO1_IN
+ { TcOutput::none, TccOutput::tcc0_7G, AdcInput::none, SercomIo::none, SercomIo::sercom5d, Nx, PinCapability::wpwm, "io1.out" }, // PB31 IO1_OUT
+
+ // Port C
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_10, SercomIo::none, SercomIo::none, Nx, PinCapability::ain, "temp0" }, // PC00 thermistor0
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_11, SercomIo::none, SercomIo::none, Nx, PinCapability::ain, "temp1" }, // PC01 thermistor1
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_4, SercomIo::none, SercomIo::none, Nx, PinCapability::ain, "temp2" }, // PC02 thermistor2
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_5, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC03 VIN monitor
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 4, PinCapability::read, "io5.in" }, // PC04 IO5_IN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 5, PinCapability::read, "io4.in" }, // PC05 IO4_IN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::write, "spi.cs3" }, // PC06 SPI_CS3
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::write, "spi.cs2" }, // PC07 SPI CS2
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC08 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC09 not on chip
+ { TcOutput::none, TccOutput::tcc1_4G, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::write, "out1" }, // PC10 SPI CS1
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 11, PinCapability::none, nullptr }, // PC11 ENC A
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC12 SPI MOSI
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC13 SPI SCK
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC14 SPI CS0 (external SD card)
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC15 SPI_MISO
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC16 driver4 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC17 phy reset/ESP reset
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC18 driver 6 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC19 driver 3 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC20 Ethernet/WiFi ESP_EN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC21 driver 4 diag
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC22 Ethernet
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC23 Ethernet
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC24 driver2 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC25 driver1 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC26 driver0 step
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC27 driver 6 diag
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC28 driver ENN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC29 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PC30 driver 5 step
+ { TcOutput::none, TccOutput::none, AdcInput::adc1_13, SercomIo::none, SercomIo::none, 15, PinCapability::ainr, "io6.in" }, // PC31 IO6_IN
+
+ // Port D
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD00 drivers UART mux
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 1, PinCapability::none, nullptr }, // PD01 ENC B
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD02 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD03 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD04 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD05 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD06 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::none, nullptr }, // PD07 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::sercom6d, SercomIo::none, 3, PinCapability::read, "io2.in" }, // PD08 IO2_IN
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::sercom6d, Nx, PinCapability::write, "io2.out" }, // PD09 IO2_OUT
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::write, "io4.out,pson" }, // PD10 IO4_OUT and PS_ON
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::write, "spi.cs1" }, // PD11 SPI2 CS1
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, 7, PinCapability::read , nullptr }, // PD12 SPI2_CD
+
+#if 1
+ // Port D 13-19 are not on the chip
+ // Port D 20-21 are driver 3 dir and driver 4 dir but those don't need to be in the pin table
+#else
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD13 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD14 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD15 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD16 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD17 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD18 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD19 not on chip
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD20 driver6 dir
+ { TcOutput::none, TccOutput::none, AdcInput::none, SercomIo::none, SercomIo::none, Nx, nullptr }, // PD21 driver5 dir
+#endif
+};
+
+#endif
+
constexpr unsigned int NumNamedPins = ARRAY_SIZE(PinTable);
static_assert(NumNamedPins == 32+32+32+13);