Duet2 WiFi Firmware on Raise 3d E2 ?
-
what thermistor do you have?
-
-
-
@Proschi78
thats not whats in the picture. can you post a link to the thermistors data sheet? -
thermocouple max31855
-
-
@Proschi78 said in Duet2 WiFi Firmware on Raise 3d E2 ?:
thermocouple
that is normally configured like this
M305 P1 X100 ; configure thermocouple for heater 1but if they connected a thermocouple directly to the adc that is something different
-
It all runs through an extruder board
-
-
Now i have the Pinout
#ifndef PINS_DUETNG_H__ #define PINS_DUETNG_H__ # define FIRMWARE_NAME "RepRapFirmware for Duet 2 WiFi/Ethernet" # define DEFAULT_BOARD_TYPE BoardType::DuetWiFi_10 constexpr size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual upload to WiFi module (module 2 is now unused) # define IAP_FIRMWARE_FILE "Duet2CombinedFirmware.bin" #define IAP_UPDATE_FILE "iap4e.bin" // using the same IAP file for both Duet WiFi and Duet Ethernet # define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin" // Features definition #define HAS_LWIP_NETWORKING 0 # define HAS_WIFI_NETWORKING 1 # define HAS_W5500_NETWORKING 1 #define HAS_CPU_TEMP_SENSOR 1 #define HAS_HIGH_SPEED_SD 1 #define SUPPORT_TMC2660 1 #define TMC2660_USES_USART 1 #define HAS_VOLTAGE_MONITOR 1 #define HAS_VREF_MONITOR 0 #define ACTIVE_LOW_HEAT_ON 1 #define SUPPORT_INKJET 0 // set nonzero to support inkjet control #define SUPPORT_ROLAND 0 // set nonzero to support Roland mill #define SUPPORT_SCANNER 1 // set zero to disable support for FreeLSS scanners #define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter #define SUPPORT_IOBITS 1 // set to support P parameter in G0/G1 commands #define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors #define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59 #define SUPPORT_OBJECT_MODEL 1 #define USE_CACHE 1 // set nonzero to enable the cache // The physical capabilities of the machine constexpr size_t NumDirectDrivers = 12; // The maximum number of drives supported directly by the electronics constexpr size_t MaxTotalDrivers = NumDirectDrivers; // The maximum number of drives including CAN expansion constexpr size_t MaxSmartDrivers = 10; // The maximum number of smart drivers constexpr size_t NumEndstops = 12; // The number of inputs we have for endstops, filament sensors etc. constexpr size_t NumHeaters = 7; // Raise for 7 and origin 8 The number of heaters in the machine; 0 is the heated bed even if there isn't one constexpr size_t NumExtraHeaterProtections = 8; // The number of extra heater protection instances constexpr size_t NumThermistorInputs = 8; constexpr size_t MinAxes = 3; // The minimum and default number of axes constexpr size_t MaxAxes = 9; // The maximum number of movement axes in the machine, usually just X, Y and Z, <= DRIVES constexpr size_t MaxExtruders = NumDirectDrivers - MinAxes; // The maximum number of extruders constexpr size_t MaxDriversPerAxis = 5; // The maximum number of stepper drivers assigned to one axis constexpr size_t NUM_SERIAL_CHANNELS = 2; // The number of serial IO channels not counting the WiFi serial connection (USB and one auxiliary UART) #define SERIAL_MAIN_DEVICE SerialUSB #define SERIAL_AUX_DEVICE Serial #define SERIAL_WIFI_DEVICE Serial1 constexpr Pin UsbVBusPin = 54; // Pin used to monitor VBUS on USB port #define I2C_IFACE Wire // Which TWI interface we use #define I2C_IRQn WIRE_ISR_ID // The interrupt number it uses constexpr Pin DueXnExpansionStart = 200; // Pin numbers 200-215 are on the I/O expander constexpr Pin AdditionalIoExpansionStart = 220; // Pin numbers 220-235 are on the additional I/O expander // The numbers of entries in each array must correspond with the values of DRIVES, AXES, or HEATERS. Set values to NoPin to flag unavailability. // DRIVES constexpr Pin GlobalTmc2660EnablePin = 38; // The pin that drives ENN of all TMC2660 drivers on production boards (on pre-production boards they are grounded) constexpr Pin ENABLE_PINS[NumDirectDrivers] = { 78, 41, 42, 49, 57, 87, 88, 89, 90, 31, 82, 60 }; constexpr Pin STEP_PINS[NumDirectDrivers] = { 70, 71, 72, 69, 68, 66, 65, 64, 67, 91, 84, 85 }; constexpr Pin DIRECTION_PINS[NumDirectDrivers] = { 75, 76, 77, 01, 73, 92, 86, 80, 81, 32, 83, 25 }; // Pin assignments etc. using USART1 in SPI mode Usart * const USART_TMC2660 = USART1; constexpr uint32_t ID_TMC2660_SPI = ID_USART1; constexpr IRQn TMC2660_SPI_IRQn = USART1_IRQn; # define TMC2660_SPI_Handler USART1_Handler constexpr Pin TMC2660MosiPin = 22; // PA13 constexpr Pin TMC2660MisoPin = 21; // PA22 constexpr Pin TMC2660SclkPin = 23; // PA23 constexpr Pin DueX_SG = 96; // DueX stallguard detect pin = PE0 (was E2_STOP) constexpr Pin DueX_INT = 17; // DueX interrupt pin = PA17 (was E6_STOP) // Endstops // RepRapFirmware only has a single endstop per axis. // Gcode defines if it is a max ("high end") or min ("low end") endstop and sets if it is active HIGH or LOW. constexpr Pin END_STOP_PINS[NumEndstops] = { 46, 02, 93, 74, 48, 96, 97, 98, 99, 17, 39, 8 }; constexpr Pin DUEX_END_STOP_PINS[5] = { 200, 203, 202, 201, 213 }; // these replace endstops 5-9 if a DueX is present // HEATERS constexpr Pin TEMP_SENSE_PINS[NumThermistorInputs] = { 45, 47, 44, 61, 62, 63, 59, 18 }; // Thermistor pin numbers constexpr Pin HEAT_ON_PINS[NumHeaters] = { 19, 20, 16, 35, 37, 40, 43};//, 15 }; // Heater pin numbers (heater 7 pin TBC) // 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 THERMISTOR_SERIES_RS = 4700.0; // Number of SPI temperature sensors to support #if SUPPORT_ROLAND // chrishamm's pin assignments constexpr size_t MaxSpiTempSensors = 2; // Digital pins the 31855s have their select lines tied to constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { 56, 27 }; #else constexpr size_t MaxSpiTempSensors = 8; // Digital pins the 31855s have their select lines tied to constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { 28, 50, 51, 52, 24, 97, 98, 99 }; // SPI0_CS1, SPI0_CS2, CS3, CS4, CS5, CS6, CS7, CS8 #endif // Pin that controls the ATX power on/off constexpr Pin ATX_POWER_PIN = 15; constexpr Pin E6_EN_PIN =31;//15;// 31; //LED constexpr Pin E6_STEP_PIN =91;//15;// 31; //POWER 12 // NEW DEFINE PIN OUT constexpr Pin E6_DIR_PIN =32; // PRO2 transfer // // Analogue pin numbers constexpr Pin Z_PROBE_PIN = 33; // AFE1_AD4/PC1 Z probe analog input constexpr Pin PowerMonitorVinDetectPin = 36; // AFE1_AD7/PC4 Vin monitor constexpr Pin PowerMonitor5vDetectPin = 29; // AFE1_AD1/PB3 5V regulator input monitor constexpr float PowerMonitorVoltageRange = 11.0 * 3.3; // We use an 11:1 voltage divider constexpr Pin VssaSensePin = 103; // Digital pin number to turn the IR LED on (high) or off (low), also controls the DIAG LED constexpr Pin Z_PROBE_MOD_PIN = 34; constexpr Pin DiagPin = Z_PROBE_MOD_PIN; constexpr Pin Heater7 = 15; // Cooling fans constexpr size_t NUM_FANS = 9; constexpr Pin COOLING_FAN_PINS[NUM_FANS] = { 58, 55, 00, 212, 207, 206, 205, 204, 215 };//raise switched 55 58 constexpr size_t NumTachos = 1; constexpr Pin TachoPins[NumTachos] = { 102 }; // PB6 on expansion connector // SD cards constexpr size_t NumSdCards = 2; constexpr Pin SdCardDetectPins[NumSdCards] = {53, NoPin}; constexpr Pin SdWriteProtectPins[NumSdCards] = {NoPin, NoPin}; constexpr Pin SdSpiCSPins[1] = {56}; constexpr uint32_t ExpectedSdCardSpeed = 20000000; #if SUPPORT_INKJET // Inkjet control pins constexpr Pin INKJET_SERIAL_OUT = xx; // Serial bitpattern into the shift register constexpr Pin INKJET_SHIFT_CLOCK = xx; // Shift the register constexpr Pin INKJET_STORAGE_CLOCK = xx; // Put the pattern in the output register constexpr Pin INKJET_OUTPUT_ENABLE = xx; // Make the output visible constexpr Pin INKJET_CLEAR = xx; // Clear the register to 0 #endif #if SUPPORT_ROLAND // Roland mill constexpr Pin ROLAND_CTS_PIN = xx; // Expansion pin 11, PA12_TXD1 constexpr Pin ROLAND_RTS_PIN = xx; // Expansion pin 12, PA13_RXD1 #endif // M42 and M208 commands now use logical pin numbers, not firmware pin numbers. // This is the mapping from logical pins 60+ to firmware pin numbers constexpr Pin SpecialPinMap[] = { 24, 97, 98, 99, // We allow CS5-CS8 to be used because few users need >4 thermocouples or RTDs 7, // SW_ENC on CONN_SD Z_PROBE_MOD_PIN }; constexpr Pin DueX5GpioPinMap[] = { 211, 210, 209, 208 }; // Pins 100-103 map to GPIO 1-4 on DueX5 // We also allow pins 120-135 to be used if there is an additional SX1509B expander constexpr int HighestLogicalPin = 135; // highest logical pin number on this electronics // SAM4E Flash locations (may be expanded in the future) constexpr uint32_t IAP_FLASH_START = 0x00470000; constexpr uint32_t IAP_FLASH_END = 0x0047FFFF; // we allow a full 64K on the SAM4 // Duet pin numbers to control the WiFi interface on the Duet WiFi constexpr Pin EspResetPin = 100; // Low on this in holds the WiFi module in reset (ESP_RESET) constexpr Pin EspEnablePin = 101; // High to enable the WiFi module, low to power it down (ESP_CH_PD) constexpr Pin EspDataReadyPin = 95; // Input from the WiFi module indicating that it wants to transfer data (ESP GPIO0) constexpr Pin SamTfrReadyPin = 94; // Output from the SAM to the WiFi module indicating we can accept a data transfer (ESP GPIO4 via 7474) constexpr Pin SamCsPin = 11; // SPI NPCS pin, input from WiFi module // Duet pin numbers to control the W5500 interface on the Duet Ethernet constexpr Pin W5500ResetPin = 100; // Low on this in holds the W5500 module in reset (ESP_RESET) constexpr Pin W5500InterruptPin = 95; // W5500 interrupt output, active low constexpr Pin W5500ModuleSensePin = 5; // URXD1, tied to ground on the Ethernet module constexpr Pin W5500SsPin = 11; // SPI NPCS pin, input from W5500 module // Timer allocation (no network timer on DuetNG) // TC0 channel 0 is used for FAN2 // TC0 channel 1 is currently unused (may use it for a heater or a fan) // TC0 channel 2 is available for us to use #define STEP_TC (TC0) #define STEP_TC_CHAN (2) #define STEP_TC_IRQN TC2_IRQn #define STEP_TC_HANDLER TC2_Handler #define STEP_TC_ID ID_TC2 #endif #endif
-
/* Copyright (c) 2011 Arduino. All right reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. */ #include "variant.h" #include "udc.h" /* For the Duet NG we use a logical pin numbering scheme: * Pins 0-25 PA0-25 * Pins 26-31 PB0-3,13,14 * Pins 32-63 PC0-31 * Pins 64-95 PD0-31 * Pins 96-101 PE0-5 * Pin 102 PB6 (this got added late) * Pins 103-107 Various composite devices * Pins 200-215 IO0-IO15 on the SX1509B port expander on the DueXn */ /* * Pins descriptions */ extern const PinDescription g_APinDescription[]= { // PIO A // Pins 0-25 are PA0-PA25 // 0-2 { PIOA, PIO_PA0B_TIOA0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC0_CHA0 }, // Fan 2 { PIOA, PIO_PA1, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E0_Dir { PIOA, PIO_PA2, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Y stop // 3-4 TWI { PIOA, PIO_PA3A_TWD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWD0 { PIOA, PIO_PA4A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TWCK0 // 5-6 UART 1 { PIOA, PIO_PA5C_URXD1, ID_PIOA, PIO_PERIPH_C, PIO_PULLUP, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // URXD1 { PIOA, PIO_PA6C_UTXD1, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // UTXD1 // 7-8 { PIOA, PIO_PA7, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SD/LCD/Encoder ENC_SW { PIOA, PIO_PA8, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Endstop 11 (was LCD ENC_A) // 9-10 UART 0 { PIOA, PIO_PA9A_URXD0, ID_PIOA, PIO_PERIPH_A, PIO_PULLUP, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // URXD0 PanelDue Dout { PIOA, PIO_PA10A_UTXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // UTXD0 PanelDue Din // 11-14 high speed SPI { PIOA, PIO_PA11A_NPCS0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // NPCS0 { PIOA, PIO_PA12A_MISO, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // MISO { PIOA, PIO_PA13A_MOSI, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // MOSI { PIOA, PIO_PA14A_SPCK, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPCK // 15-20 general I/O { PIOA, PIO_PA15B_TIOA1, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC0_CHA1 }, // Heater 7 { PIOA, PIO_PA16C_PWML2, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, PWM_CH2, NOT_ON_TIMER }, // Heater 2 { PIOA, PIO_PA17X1_AFE0_AD0, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, NOT_ON_PWM, NOT_ON_TIMER }, // PA17/ADC0 { PIOA, PIO_PA18X1_AFE0_AD1, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC1, NOT_ON_PWM, NOT_ON_TIMER }, // PA18/ADC1 { PIOA, PIO_PA19B_PWML0, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, PWM_CH0, NOT_ON_TIMER }, // Heater 0 { PIOA, PIO_PA20B_PWML1, ID_PIOA, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, PWM_CH1, NOT_ON_TIMER }, // Heater 1 // 21-23 SPI bus 1 { PIOA, PIO_PA21A_RXD1, ID_PIOA, PIO_PERIPH_A, PIO_PULLUP, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI bus 1 MISO { PIOA, PIO_PA22A_TXD1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI bus 1 MOSI { PIOA, PIO_PA23A_SCK1, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI bus 1 SPCK // 24-25 { PIOA, PIO_PA24, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI bus 0 CS5 { PIOA, PIO_PA25, ID_PIOA, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // DIR_11 (was LCD_E) // PA26-31 are used by HSMCI // PIO B // Pins 26-29 are PB0-PB3 // PB4-PB12 not available (JTAG, crystal, USB, Erase) // Pins 30-31 are PB13-PB14 // PB15-31 not present on chip // 26-27 SPI bus 0 { PIOB, PIO_PB0C_RXD0, ID_PIOB, PIO_PERIPH_C, PIO_PULLUP, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 MISO { PIOB, PIO_PB1C_TXD0, ID_PIOB, PIO_PERIPH_C, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 MOSI // 28-29 { PIOB, PIO_PB2, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 CS1 { PIOB, PIO_PB3X1_AFE1_AD1, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC17, NOT_ON_PWM, NOT_ON_TIMER }, // Power fail detect 5V regulator input // 30 SPI bus 0 { PIOB, PIO_PB13C_SCK0, ID_PIOB, PIO_PERIPH_C, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 SPCK // 31 DAC 1 { PIOB, PIO_PB14X1_DAC1, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DAC, DA1, NOT_ON_PWM, NOT_ON_TIMER }, // DAC 1 (E1 motor current) // PIO C // Pins 32-63 are PC0-PC31 // 32-39 { PIOC, PIO_PC0, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, ADC14, NOT_ON_PWM, NOT_ON_TIMER }, // PC0/AFE0_AD14 used for E6_DIR { PIOC, PIO_PC1X1_AFE1_AD4, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC20, NOT_ON_PWM, NOT_ON_TIMER }, // Z probe analog in { PIOC, PIO_PC2, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Z probe mod and LED { PIOC, PIO_PC3B_PWML3, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), NO_ADC, PWM_CH3, NOT_ON_TIMER }, // Heater 3 { PIOC, PIO_PC4X1_AFE1_AD7, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC23, NOT_ON_PWM, NOT_ON_TIMER }, // Vin power fail detect { PIOC, PIO_PC5B_TIOA6, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC2_CHA6 }, // Heater 4 { PIOC, PIO_PC6, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // TMC2660 EN { PIOC, PIO_PC7, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Endstop 10 (was LCD ENC_B) // 40-47 { PIOC, PIO_PC8B_TIOA7, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC2_CHA7 }, // Heater 5 { PIOC, PIO_PC9, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Y en { PIOC, PIO_PC10, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Z en { PIOC, PIO_PC11B_TIOA8, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC2_CHA8 }, // Heater 6 { PIOC, PIO_PC12X1_AFE0_AD8, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC8, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 2 { PIOC, PIO_PC13X1_AFE0_AD6, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC6, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 0 { PIOC, PIO_PC14, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // X endstop { PIOC, PIO_PC15X1_AFE0_AD7, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 1 // 48-55 { PIOC, PIO_PC16, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E1 endstop { PIOC, PIO_PC17, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E0 EN { PIOC, PIO_PC18, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 CS2 { PIOC, PIO_PC19, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 CS3 { PIOC, PIO_PC20, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 CS4 { PIOC, PIO_PC21, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // HSMCI CD { PIOC, PIO_PC22, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // VBUS { PIOC, PIO_PC23B_TIOA3, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC1_CHA3 }, // Fan 0 // 56-63 { PIOC, PIO_PC24, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SPI0 CS0 { PIOC, PIO_PC25, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E1 EN { PIOC, PIO_PC26B_TIOA4, ID_PIOC, PIO_PERIPH_B, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_TIMER), NO_ADC, NOT_ON_PWM, TC1_CHA4 }, // Fan 1 { PIOC, PIO_PC27X1_AFE0_AD13,ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC13, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 6 { PIOC, PIO_PC28, ID_PIOC, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // EN_11 (was LCD_RS) { PIOC, PIO_PC29X1_AFE0_AD9, ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC9, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 3 { PIOC, PIO_PC30X1_AFE0_AD10,ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC10, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 4 { PIOC, PIO_PC31X1_AFE0_AD11,ID_PIOC, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC11, NOT_ON_PWM, NOT_ON_TIMER }, // Thermistor 5 // PIO D // Pins 64-95 are PD0-PD31 // 64-71 { PIOD, PIO_PD0, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E4 step { PIOD, PIO_PD1, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E3 step { PIOD, PIO_PD2, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E2 step { PIOD, PIO_PD3, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E5 step { PIOD, PIO_PD4, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E1 step { PIOD, PIO_PD5, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E0 step { PIOD, PIO_PD6, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // X step { PIOD, PIO_PD7, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Y step // 72-79 { PIOD, PIO_PD8, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Z step { PIOD, PIO_PD9, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E1 dir { PIOD, PIO_PD10, ID_PIOD, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E0 endstop { PIOD, PIO_PD11, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // X dir { PIOD, PIO_PD12, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Y dir { PIOD, PIO_PD13, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Z dir { PIOD, PIO_PD14, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // X en { PIOD, PIO_PD15, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PS On // 80-87 { PIOD, PIO_PD16, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E4 dir { PIOD, PIO_PD17, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E5 dir { PIOD, PIO_PD18, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // EN_10 (was LCD DB7) { PIOD, PIO_PD19, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // DIR_10 (was LCD DB6) { PIOD, PIO_PD20, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // STEP 10 (was LCD DB5) { PIOD, PIO_PD21, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // STEP_11 (was LCD DB4) { PIOD, PIO_PD22, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E3 dir { PIOD, PIO_PD23, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E2 en // 88-95 { PIOD, PIO_PD24, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E3 en { PIOD, PIO_PD25, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E4 en { PIOD, PIO_PD26, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E5 en { PIOD, PIO_PD27, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Expansion PD27 { PIOD, PIO_PD28, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E2 dir { PIOD, PIO_PD29, ID_PIOD, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // Z endstop { PIOD, PIO_PD30, ID_PIOD, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // SAM transfer Ready { PIOD, PIO_PD31, ID_PIOD, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ESP data ready // PIO E // Pins 96-101 are PE0-5 { PIOE, PIO_PE0, ID_PIOE, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E2 endstop { PIOE, PIO_PE1, ID_PIOE, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E3 endstop { PIOE, PIO_PE2, ID_PIOE, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E4 endstop { PIOE, PIO_PE3, ID_PIOE, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // E5 endstop { PIOE, PIO_PE4, ID_PIOE, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ESP NRST { PIOE, PIO_PE5, ID_PIOE, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ESP PD/EN // 102 PB6 - was thought to be dedicated to JTAG but is also available on the expansion connector { PIOB, PIO_PB6, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // expansion // 103 PB7 - now used as the VSSA sense pin { PIOB, PIO_PB7, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // VSSA sense // 104 PB4 - used by the ATE { PIOB, PIO_PB4, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ATE // 105 PB5 - used by the ATE { PIOB, PIO_PB5, ID_PIOB, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // ATE // 106-107 HSMCI { PIOA, PIO_PA29C_MCCK, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // HSMCI MCCK { PIOA, PIO_PA28C_MCCDA | PIO_PA30C_MCDA0 | PIO_PA31C_MCDA1 | PIO_PA26C_MCDA2 | PIO_PA27C_MCDA3, ID_PIOA, PIO_PERIPH_C, PIO_PULLUP, PIN_ATTR_DIGITAL, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // HSMCI MCCDA, MCDA0-3 // 108 - TWI0 all pins { PIOA, PIO_PA3A_TWD0|PIO_PA4A_TWCK0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 109 - UART0 all pins { PIOA, PIO_PA9A_URXD0|PIO_PA10A_UTXD0, ID_PIOA, PIO_PERIPH_A, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // 110 - UART1 all pins { PIOA, PIO_PA5C_URXD1|PIO_PA6C_UTXD1, ID_PIOA, PIO_PERIPH_C, PIO_DEFAULT, (PIN_ATTR_DIGITAL|PIN_ATTR_COMBO), NO_ADC, NOT_ON_PWM, NOT_ON_TIMER } }; /* * UART objects */ RingBuffer rx_buffer1; RingBuffer tx_buffer1; RingBuffer rx_buffer2; RingBuffer tx_buffer2; UARTClass Serial(UART0, UART0_IRQn, ID_UART0, &rx_buffer1, &tx_buffer1); void UART0_Handler(void) { Serial.IrqHandler(); } UARTClass Serial1(UART1, UART1_IRQn, ID_UART1, &rx_buffer2, &tx_buffer2); void UART1_Handler(void) { Serial1.IrqHandler(); } // ---------------------------------------------------------------------------- void ConfigurePin(const PinDescription& pinDesc) { pio_configure(pinDesc.pPort, pinDesc.ulPinType, pinDesc.ulPin, pinDesc.ulPinConfiguration); } extern "C" void init( void ) { // We no longer disable pullups on all pins here, better to leave them enabled until the port is initialised // Initialize Serial port U(S)ART pins ConfigurePin(g_APinDescription[APINS_Serial0]); setPullup(APIN_Serial0_RXD, true); // Enable pullup for RX0 // Initialize Analog Controller AnalogInInit(); // Initialize analogOutput module AnalogOutInit(); // Initialize HSMCI pins ConfigurePin(g_APinDescription[APIN_HSMCI_CLOCK]); ConfigurePin(g_APinDescription[APINS_HSMCI_DATA]); } // End
-
if the thread is m3 you might be able to use these as replacement
-
The Gcodes have also been changed
-
I will try to create a firmware that consists of a duet and raise mix
-
what does the number after Recv : ok (20) Mean?
-
Where are you seeing that message?
-
@Phaedrux In the log of printing
-
is that in octoprint?
-
@Veti No, it is in the printer's log.
-
Screen shot?