Skip to content
This repository was archived by the owner on Jul 9, 2020. It is now read-only.

Commit bc04c68

Browse files
committed
Merge remote-tracking branch 'origin/v3-dev' into v3-chrishamm
2 parents 81d6107 + e9a0acd commit bc04c68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1357
-823
lines changed

.cproject

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,7 @@
534534
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
535535
<listOptionValue builtIn="false" value="RTOS"/>
536536
<listOptionValue builtIn="false" value="DUET3_V03"/>
537+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
537538
</option>
538539
<option id="gnu.c.compiler.option.dialect.std.133148413" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
539540
<option id="gnu.c.compiler.option.dialect.flags.489815237" name="Other dialect flags" superClass="gnu.c.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu99" valueType="string"/>
@@ -605,6 +606,7 @@
605606
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
606607
<listOptionValue builtIn="false" value="RTOS"/>
607608
<listOptionValue builtIn="false" value="DUET3_V03"/>
609+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
608610
<listOptionValue builtIn="false" value="_XOPEN_SOURCE"/>
609611
</option>
610612
<option id="gnu.cpp.compiler.option.dialect.std.815297330" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
@@ -1201,6 +1203,7 @@
12011203
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
12021204
<listOptionValue builtIn="false" value="RTOS"/>
12031205
<listOptionValue builtIn="false" value="DUET3_V05"/>
1206+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
12041207
</option>
12051208
<option id="gnu.c.compiler.option.dialect.std.1184547155" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
12061209
<option id="gnu.c.compiler.option.dialect.flags.1834251763" name="Other dialect flags" superClass="gnu.c.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu99" valueType="string"/>
@@ -1271,6 +1274,7 @@
12711274
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
12721275
<listOptionValue builtIn="false" value="RTOS"/>
12731276
<listOptionValue builtIn="false" value="DUET3_V05"/>
1277+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
12741278
<listOptionValue builtIn="false" value="_XOPEN_SOURCE"/>
12751279
</option>
12761280
<option id="gnu.cpp.compiler.option.dialect.std.264694574" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
@@ -1540,6 +1544,7 @@
15401544
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
15411545
<listOptionValue builtIn="false" value="RTOS"/>
15421546
<listOptionValue builtIn="false" value="DUET3_V06"/>
1547+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
15431548
</option>
15441549
<option id="gnu.c.compiler.option.dialect.std.1738681846" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
15451550
<option id="gnu.c.compiler.option.dialect.flags.1952106689" name="Other dialect flags" superClass="gnu.c.compiler.option.dialect.flags" useByScannerDiscovery="true" value="-std=gnu99" valueType="string"/>
@@ -1607,6 +1612,7 @@
16071612
<listOptionValue builtIn="false" value="__SAME70Q20B__"/>
16081613
<listOptionValue builtIn="false" value="RTOS"/>
16091614
<listOptionValue builtIn="false" value="DUET3_V06"/>
1615+
<listOptionValue builtIn="false" value="LWIP_GMAC_TASK=0"/>
16101616
<listOptionValue builtIn="false" value="_XOPEN_SOURCE"/>
16111617
</option>
16121618
<option id="gnu.cpp.compiler.option.dialect.std.1240779290" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>

src/CAN/CanInterface.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "Movement/DriveMovement.h"
1818
#include "Movement/StepTimer.h"
1919
#include <RTOSIface/RTOSIface.h>
20+
#include <TaskPriorities.h>
2021

2122
#if HAS_LINUX_INTERFACE
2223
# include "Linux/LinuxInterface.h"

src/CAN/CommandProcessor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ pre(buf->id.MsgType() == CanMessageType::FirmwareBlockRequest)
186186
msgp->fileOffset = fileOffset;
187187
buf->dataLength = msgp->GetActualDataLength();
188188
CanInterface::SendResponse(buf);
189-
debugPrintf(".");
190189
fileOffset += lengthToSend;
191190
lreq -= lengthToSend;
192191
if (lreq == 0)

src/Configuration.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ constexpr uint32_t SERIAL_MAIN_TIMEOUT = 1000; // timeout in ms for sending da
7575
constexpr uint32_t HeatSampleIntervalMillis = 250; // interval between taking temperature samples
7676
constexpr float HeatPwmAverageTime = 5.0; // Seconds
7777

78+
constexpr uint8_t SensorsTaskTotalDelay = 250; // Interval between runs of sensors task
79+
7880
constexpr float TEMPERATURE_CLOSE_ENOUGH = 1.0; // Celsius
7981
constexpr float TEMPERATURE_LOW_SO_DONT_CARE = 40.0; // Celsius
8082
constexpr float HOT_ENOUGH_TO_EXTRUDE = 160.0; // Celsius

src/Duet3_V03/Pins_Duet3_V03.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#ifndef PINS_SAME70_H__
22
#define PINS_SAME70_H__
33

4-
#define BOARD_SHORT_NAME "MBP03"
5-
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 v0.3"
6-
#define DEFAULT_BOARD_TYPE BoardType::Duet3_03
4+
#define BOARD_SHORT_NAME "MBP03"
5+
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 v0.3"
6+
#define DEFAULT_BOARD_TYPE BoardType::Duet3
77
const size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual upload to WiFi module (module 2 not used)
88

9-
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10-
#define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin"
11-
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
9+
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10+
#define WIFI_FIRMWARE_FILE "DuetWiFiServer.bin"
11+
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
1212

1313
// Features definition
1414
#define HAS_LWIP_NETWORKING 1
@@ -31,7 +31,7 @@ const size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manual u
3131
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
3232
#define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter
3333
#define SUPPORT_IOBITS 1 // set to support P parameter in G0/G1 commands
34-
#define SUPPORT_DHT_SENSOR 0 //TEMP!! // set nonzero to support DHT temperature/humidity sensors
34+
#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors
3535
#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
3636
#define SUPPORT_OBJECT_MODEL 1
3737
#define SUPPORT_FTP 1

src/Duet3_V05/Pins_Duet3_V05.h

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef PINS_SAME70_H__
22
#define PINS_SAME70_H__
33

4-
#define BOARD_SHORT_NAME "MBP05"
5-
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 v0.5"
6-
#define DEFAULT_BOARD_TYPE BoardType::Duet3_05
4+
#define BOARD_SHORT_NAME "MBP05"
5+
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 prototype v0.5"
6+
#define DEFAULT_BOARD_TYPE BoardType::Duet3
77
const size_t NumFirmwareUpdateModules = 1;
88

9-
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10-
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
9+
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10+
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
1111

1212
// Features definition
1313
#define HAS_LWIP_NETWORKING 1
@@ -30,7 +30,7 @@ const size_t NumFirmwareUpdateModules = 1;
3030
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
3131
#define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter
3232
#define SUPPORT_IOBITS 1 // set to support P parameter in G0/G1 commands
33-
#define SUPPORT_DHT_SENSOR 0 //Temporary! // set nonzero to support DHT temperature/humidity sensors
33+
#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors
3434
#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
3535
#define SUPPORT_OBJECT_MODEL 1
3636
#define SUPPORT_FTP 0 // no point in supporting FTP because we have no mass storage
@@ -252,13 +252,18 @@ constexpr Pin LinuxTfrReadyPin = PortEPin(2);
252252
Spi * const LinuxSpi = SPI1;
253253

254254
// Timer allocation
255+
256+
#if !LWIP_GMAC_TASK
257+
255258
// Network timer is timer 4 aka TC1 channel1
256259
#define NETWORK_TC (TC1)
257260
#define NETWORK_TC_CHAN (1)
258261
#define NETWORK_TC_IRQN TC4_IRQn
259262
#define NETWORK_TC_HANDLER TC4_Handler
260263
#define NETWORK_TC_ID ID_TC4
261264

265+
#endif
266+
262267
// Step timer is timer 2 aka TC0 channel 2
263268
#define STEP_TC (TC0)
264269
#define STEP_TC_CHAN (2)

src/Duet3_V06/Pins_Duet3_V06.h

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#ifndef PINS_SAME70_H__
22
#define PINS_SAME70_H__
33

4-
#define BOARD_SHORT_NAME "MB6HC"
5-
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 v0.6"
6-
#define DEFAULT_BOARD_TYPE BoardType::Duet3_06
4+
#define BOARD_SHORT_NAME "MB6HC"
5+
#define FIRMWARE_NAME "RepRapFirmware for Duet 3 MB6HC v0.6 or 1.0"
6+
#define DEFAULT_BOARD_TYPE BoardType::Duet3
77
const size_t NumFirmwareUpdateModules = 1;
88

9-
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10-
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
9+
#define IAP_FIRMWARE_FILE "Duet3Firmware_" BOARD_SHORT_NAME ".bin"
10+
#define IAP_UPDATE_FILE "Duet3iap_sd_" BOARD_SHORT_NAME ".bin"
1111

1212
// Features definition
1313
#define HAS_LWIP_NETWORKING 1
@@ -34,7 +34,7 @@ const size_t NumFirmwareUpdateModules = 1;
3434
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
3535
#define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter
3636
#define SUPPORT_IOBITS 1 // set to support P parameter in G0/G1 commands
37-
#define SUPPORT_DHT_SENSOR 0 //Temporary! // set nonzero to support DHT temperature/humidity sensors
37+
#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors
3838
#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
3939
#define SUPPORT_OBJECT_MODEL 1
4040
#define SUPPORT_FTP 1
@@ -67,11 +67,13 @@ constexpr size_t MaxZProbes = 4;
6767
constexpr size_t MaxGpioPorts = 12;
6868

6969
constexpr size_t MinAxes = 3; // The minimum and default number of axes
70-
constexpr size_t MaxAxes = 9; // The maximum number of movement axes in the machine, usually just X, Y and Z, <= DRIVES
70+
constexpr size_t MaxAxes = 10; // The maximum number of movement axes in the machine
7171
constexpr size_t MaxDriversPerAxis = 5; // The maximum number of stepper drivers assigned to one axis
7272

7373
constexpr size_t MaxExtruders = 16; // The maximum number of extruders
74-
constexpr size_t NumDefaultExtruders = 3; // The number of drivers that we configure as extruders by default
74+
constexpr size_t NumDefaultExtruders = 1; // The number of drivers that we configure as extruders by default
75+
76+
constexpr size_t MaxAxesPlusExtruders = 20; // May be <= MaxAxes + MaxExtruders
7577

7678
constexpr size_t MaxHeatersPerTool = 4;
7779
constexpr size_t MaxExtrudersPerTool = 6;
@@ -232,9 +234,9 @@ constexpr PinEntry PinTable[] =
232234
{ PortAPin(3), PinCapability::rw, "io3.out" },
233235
{ PortEPin(0), PinCapability::rwpwm, "io4.out" },
234236
{ PortDPin(21), PinCapability::rwpwm, "io5.out" },
235-
{ PortAPin(0), PinCapability::rwpwm, "io6.out" },
237+
{ PortAPin(0), PinCapability::rw, "io6.out" },
236238
{ PortCPin(23), PinCapability::rwpwm, "io7.out" },
237-
{ PortEPin(1), PinCapability::rwpwm, "io8.out" },
239+
{ PortEPin(1), PinCapability::rw, "io8.out" }, // this pin could be PWM capable but shares the TC with io7.out, so the PWM frequencies are not independent
238240

239241
// Thermistor inputs
240242
{ PortCPin(15), PinCapability::ainr, "temp0" },
@@ -265,13 +267,18 @@ constexpr Pin LinuxTfrReadyPin = PortEPin(2);
265267
Spi * const LinuxSpi = SPI1;
266268

267269
// Timer allocation
270+
271+
#if !LWIP_GMAC_TASK
272+
268273
// Network timer is timer 4 aka TC1 channel1
269274
#define NETWORK_TC (TC1)
270275
#define NETWORK_TC_CHAN (1)
271276
#define NETWORK_TC_IRQN TC4_IRQn
272277
#define NETWORK_TC_HANDLER TC4_Handler
273278
#define NETWORK_TC_ID ID_TC4
274279

280+
#endif
281+
275282
// Step timer is timer 2 aka TC0 channel 2
276283
#define STEP_TC (TC0)
277284
#define STEP_TC_CHAN (2)

src/DuetM/Pins_DuetM.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ constexpr size_t NumFirmwareUpdateModules = 1; // 1 module
3333
#define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners
3434
#define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter
3535
#define SUPPORT_IOBITS 0 // set to support P parameter in G0/G1 commands
36-
#define SUPPORT_DHT_SENSOR 0 //TEMp! // set nonzero to support DHT temperature/humidity sensors (requires RTOS)
36+
#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors (requires RTOS)
3737
#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
3838
#define SUPPORT_12864_LCD 1 // set nonzero to support 12864 LCD and rotary encoder
3939
#define SUPPORT_OBJECT_MODEL 1
@@ -65,7 +65,9 @@ constexpr size_t MaxAxes = 6; // The maximum number of movement axes in the
6565
constexpr size_t MaxDriversPerAxis = 4; // The maximum number of stepper drivers assigned to one axis
6666

6767
constexpr size_t MaxExtruders = 4; // The maximum number of extruders
68-
constexpr size_t NumDefaultExtruders = 4; // The number of drivers that we configure as extruders by default
68+
constexpr size_t NumDefaultExtruders = 1; // The number of drivers that we configure as extruders by default
69+
70+
constexpr size_t MaxAxesPlusExtruders = 7;
6971

7072
constexpr size_t MaxHeatersPerTool = 2;
7173
constexpr size_t MaxExtrudersPerTool = 4;
@@ -123,11 +125,8 @@ constexpr float EXT_SHC = 0.0;
123125
constexpr float DefaultThermistorSeriesR = 2200.0;
124126
constexpr float MinVrefLoadR = (DefaultThermistorSeriesR / 4) * 4700.0/((DefaultThermistorSeriesR / 4) + 4700.0);
125127
// there are 4 temperature sensing channels and a 4K7 load resistor
126-
// Number of SPI temperature sensors to support
127-
constexpr size_t MaxSpiTempSensors = 2;
128-
129128
// Digital pins the 31855s have their select lines tied to
130-
constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { PortBPin(14), PortCPin(19) }; // SPI0_CS1, SPI0_CS2
129+
constexpr Pin SpiTempSensorCsPins[] = { PortBPin(14), PortCPin(19) }; // SPI0_CS1, SPI0_CS2
131130

132131
// Pin that controls the ATX power on/off
133132
constexpr Pin ATX_POWER_PIN = PortAPin(0);

src/DuetNG/DueXn.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "RepRap.h"
1212
#include "Wire.h"
1313
#include "Hardware/I2C.h"
14+
#include <TaskPriorities.h>
1415

1516
namespace DuetExpansion
1617
{

src/DuetNG/Pins_DuetNG.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ constexpr size_t NumFirmwareUpdateModules = 4; // 3 modules, plus one for manua
3131
#define SUPPORT_SCANNER 1 // set zero to disable support for FreeLSS scanners
3232
#define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter
3333
#define SUPPORT_IOBITS 1 // set to support P parameter in G0/G1 commands
34-
#define SUPPORT_DHT_SENSOR 0 //TEMP! // set nonzero to support DHT temperature/humidity sensors
34+
#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors
3535
#define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59
3636
#define SUPPORT_12864_LCD 0 // set nonzero to support 12864 LCD and rotary encoder
3737
#define SUPPORT_OBJECT_MODEL 1
@@ -65,7 +65,9 @@ constexpr size_t MaxAxes = 9; // The maximum number of movement axes in the
6565
constexpr size_t MaxDriversPerAxis = 5; // The maximum number of stepper drivers assigned to one axis
6666

6767
constexpr size_t MaxExtruders = 6; // The maximum number of extruders
68-
constexpr size_t NumDefaultExtruders = 2; // The number of drivers that we configure as extruders by default
68+
constexpr size_t NumDefaultExtruders = 1; // The number of drivers that we configure as extruders by default
69+
70+
constexpr size_t MaxAxesPlusExtruders = 12;
6971

7072
constexpr size_t MaxHeatersPerTool = 8;
7173
constexpr size_t MaxExtrudersPerTool = 8;
@@ -137,12 +139,8 @@ constexpr float EXT_SHC = 0.0;
137139
constexpr float DefaultThermistorSeriesR = 4700.0;
138140
constexpr float MinVrefLoadR = DefaultThermistorSeriesR / 8; // there are 8 temperature sensing channels
139141

140-
// Number of SPI temperature sensors to support
141-
142-
constexpr size_t MaxSpiTempSensors = 8;
143-
144142
// Digital pins the 31855s have their select lines tied to
145-
constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] =
143+
constexpr Pin SpiTempSensorCsPins[] =
146144
{ PortBPin(2), PortCPin(18), PortCPin(19), PortCPin(20), PortAPin(24), PortEPin(1), PortEPin(2), PortEPin(3) }; // SPI0_CS1, SPI0_CS2, CS3, CS4, CS5, CS6, CS7, CS8
147145

148146
// Pin that controls the ATX power on/off

0 commit comments

Comments
 (0)