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-26 21:47:41 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-09-26 21:47:41 +0300
commit207b47f6ac82191ef38888e13ea1533a23b3fda8 (patch)
tree2f9160076229eaddd1b1a7f22b2c176a6f37006e /src/Duet3Mini
parentaf5fa596d901d7aa5994b1fcb7bc4feb64a78ab1 (diff)
Fixes for Duet 3 Mini v0.4
Diffstat (limited to 'src/Duet3Mini')
-rw-r--r--src/Duet3Mini/Pins_Duet3Mini.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/Duet3Mini/Pins_Duet3Mini.h b/src/Duet3Mini/Pins_Duet3Mini.h
index d5ab7cae..a2f4153e 100644
--- a/src/Duet3Mini/Pins_Duet3Mini.h
+++ b/src/Duet3Mini/Pins_Duet3Mini.h
@@ -228,10 +228,15 @@ constexpr Pin TEMP_SENSE_PINS[NumThermistorInputs] = { PortCPin(0), PortCPin(1),
constexpr Pin VssaSensePin = PortBPin(4);
constexpr Pin VrefSensePin = PortBPin(5);
-// 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
+constexpr float DefaultThermistorSeriesR = 2200.0; // Thermistor series resistor value in ohms
+constexpr float MinVrefLoadR = (DefaultThermistorSeriesR / ARRAY_SIZE(TEMP_SENSE_PINS)) * 4700.0/((DefaultThermistorSeriesR / ARRAY_SIZE(TEMP_SENSE_PINS)) + 4700.0);
+ // there are 3 temperature sensing channels and a 4K7 load resistor
+#if defined(DUET3MINI_V04)
+constexpr float VrefSeriesR = 27.0;
+#elif defined(DUET3MINI_V02)
+constexpr float VrefSeriesR = 15.0;
+#endif
+
// 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
@@ -597,7 +602,7 @@ constexpr PinDescription PinTable[] =
{ 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::tc4_1, 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
@@ -628,7 +633,7 @@ constexpr PinDescription PinTable[] =
{ 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::tcc1_4G, AdcInput::none, SercomIo::none, SercomIo::none, Nx, PinCapability::wpwm, "out1" }, // PC10 OUT1
{ 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