3.3B3 certain lines cause firmware reset
-
I am also running into a problem with variables on the SBC controlled machine. I am not super surprised as it just got implemented. Merely documenting the issue. Everything below runs fin on a D2wifi.
The following line in my daemon.g also cause a firmware reset:
set global.printcomplete = state.upTime - global.printstoptime
The two global variables are defined in config.g. They show up in the object model correctly. I just cannot do math with them. I can set them without issue as follows:
set global.printcomplete = state.upTime
To be clear i am still using the 3.3b3+1 firmware for this as well.
-
@alex-cr Please post your config.g file.
-
As requested
; Configuration file for Duet 3 (firmware version 3) ; executed by the firmware on start-up ; ;Voron 2.4 config 350x350x350mm ;Hardware: Duet3 6HC+3HC, mosquito hotend, ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves ;M550 P"Voron" ; set printer name M669 K1 ; switch to CoreXY mode M80 ; turn off ATX supply for safety (and trigger button on DWC) G4 S3 ; wait for Canbus to stabilize ; --- drive map --- ; _______ ; | 3 | 4 | ; | ----- | ; | 2 | 5 | ; ------- ; front ; Drives M569 P0.0 S0 ; physical drive 0.0 goes forwards (A Stepper) M569 P0.1 S0 ; physical drive 0.1 goes forwards (B Stepper) M569 P0.2 S0 ; physical drive 0.2 goes forwards M569 P0.3 S1 ; physical drive 0.3 goes backwards M569 P0.4 S0 ; physical drive 0.4 goes forwards M569 P0.5 S1 ; physical drive 0.5 goes backwards M569 P1.0 S0 ; physical drive 1.0 goes forwards (E Stepper) M584 X0.1 Y0.0 Z0.2:0.3:0.4:0.5 E1.0 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.0 E417.075 ; set steps per mm (E415 baseline BMG) M906 X1200 Y1200 Z1200 E800 I50 ; set motor currents (mA) and motor idle factor in per cent M84 S120 ; Set idle timeout ; Accelerations and speed M98 P"/macros/print_scripts/speed_normal.g" ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X350.0 Y350.0 Z330.0 S0 ; set axis maxima ; Endstops M574 X2 S1 P"0.io2.in" ; configure active-high endstop for high end on X via pin io2.in M574 Y2 S1 P"0.io1.in" ; configure active-high endstop for high end on Y via pin io1.in M574 Z1 S1 P"0.io3.in" ; ; BLTouch ;M950 S0 C"0.io7.out" ; create servo pin 0 for BLTouch ;M558 P9 C"^0.io6.in" H5 A3 S0.005 F120 T9000 ; set Z probe type to bltouch and the dive height + speeds (probe 3 times and average) ;G31 P25 X0.0 Y23.23 z3.5 ; Nozzle Height sensor ;M558 P8 C"^0.io3.in" H5 A1 F120 T9000 K0 ; set Z probe type to unfiltered digital and the dive height + speeds ;G31 K0 P500 Z-4.0 ;NPN NO switch M558 P5 C"!^0.io7.in" T18000 F600 H5 A3 S0.01 B0 R0.2 K0 G31 K0 P25 X0.0 Y25.0 z2.458 ; set Z probe trigger value, offset and trigger height, M557 X25:325 Y25:325 S100 ; define mesh grid ; Bed leveling M671 X-70:-70:420:420 Y-10:460:460:-10 S20 ; Define Z belts locations (Front_Left, Back_Left, Back_Right, Front_Right) ; Heaters ;bed heater - dual sensor config ;hex stud thermistor: https://www.amazon.com/gp/product/B07Q5MKSLS/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 M308 S0 P"0.temp0" Y"thermistor" T100000 B3950 C0.0 A"Build Plate Temp" ; configure sensor 0 as thermistor on pin temp0 ;Built in Keenovo sensor M308 S1 P"0.temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Bed Heater Temp" ; configure sensor 0 as thermistor on pin temp1 M950 H0 C"0.out0" T0 Q60 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.0 ; disable bang-bang mode for the bed heater and set PWM limit ;M307 H0 R0.450 C420.1 D1.06 S1.00 M307 H0 R0.153 C1735.5 D31.48 S1.00 M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for build plate to 120C M143 H0 T1 P1 S125 A2 ; Monitor heater thermistor, if temp goes above 125C temporarily turn off M143 H0 T1 P2 S132 A3 ; Monitor heater thermistor, if temp goes above 132C cut "atx" supply ;Extruder T0 heater ;Slice Engineering 50W heater+ E3d PT100 M308 S2 P"1.spi.cs0" Y" rtd-max31865" A"T0" ;configure sensor 2 as PT100 on SPI M950 H1 C"1.out0" T2 ; create nozzle heater output on out1 and map it to sensor 2 M307 H1 B0 S1.00 ; disable bang-bang mode for the nozzle heater and set PWM limit M307 H1 R2.995 C180.5:160.8 D2.60 S1.00 V24.1 M143 H1 S300 ; set temperature limit for heater 1 to 300C ;Chamber Monitors ;Thermisors below: https://www.amazon.com/gp/product/B07D9LSKWK/ref=ppx_yo_dt_b_asin_title_o03_s00?ie=UTF8&psc=1 M308 S3 P"1.temp1" Y"thermistor" T100000 B4725 C7.06e-8 A"Chamber Upper Temp" M308 S4 P"0.temp2" Y"thermistor" T100000 B4725 C7.06e-8 A"Chamber Gantry Temp" ; configure sensor 2 as thermistor on pin temp2 M308 S5 P"0.temp3" Y"thermistor" T100000 B4725 C7.06e-8 A"Z Motor4 Temp" ; Epoxied to stepper 4 M308 S10 P"0.spi.cs1" Y"dht22" A"Chamber Lower Temp" ; define DHT22 temperature sensor M308 S11 P"S10.1" Y"dhthumidity" A"Chamber Hum[%]" ; Attach DHT22 humidity sensor to secondary output of temperature sensor ;mcu calibration M308 S7 Y"mcu-temp" A"MCU" ; configure MCU as sensor 3 M912 P0 S-13.6 ; set CPU temp correction ; Fans/LEDs ;part cooling fan M950 F0 C"1.out7" Q500 ; create fan 0 on pin out1 and set its frequency M106 P0 S0 H-1 L2 C"Part fan" ; set fan 0 value. Thermostatic control is turned off ;main extruder heater cooling fan M950 F1 C"1.out6" Q500 ; create fan 1 on pin 20.out1 and set its frequency M106 P1 S255 H2 T45 C"Extruder fan" ; set fan 1 value. Thermostatic control is turned on ;Electronic cooling fan M950 F2 C"0.out7" Q100 ; create fan 2 on pin out7 and set its frequency ;M106 P2 S.25 H-1 C"MCU fans" M106 P2 L0.25 X1 H7 T26:32 C"MCU fans" ; set fan 2 value. Thermostatic control is turned on ;Main LEDs M950 F3 C"0.out4" Q500 ; create fan 3 on pin out4 and set its frequency M106 P3 S0 H-1 C"Lights" ; set fan 3 value. Thermostatic control is turned off ;Filter fan M950 F4 C"1.out8" Q100 ; create fan 4 on pin out8 and set its frequency M106 P4 S0 H-1 C"Filter Fan" ; set fan 4 value. Thermostatic control is turned off ; Tools M563 P0 S"Tool 0" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C M591 D0 P7 C"1.io0.in" S1 E25 L2.1 R70:130 ; create filament monitor for Tool 0 M572 D0 S0.00 ; default pressure advance for Tool 0 M592 D0 A0.0 B0.00 L0.2 ; Nonlinear extrusion Tool 0 ;M593 F34.48 ; Cancel ringing ;Work Offsets: G10L2P1 X0.0Y0.0Z0.0 ;Set G54 offset to be machine coordinates G10L2P7 X230.2Y349.5Z0.0 ;use G59.1 for tool height probing Z zero is top of the setter when not pressed G10L2P8 X100.0Y344.5Z5.0 ;use G59.2 for nozzle cleaning, center of brush, top of brush ; Motor Stall Detect M915 X S10 F1 H200 R1 M915 Y S10 F1 H200 R1 M915 Z S10 F1 H200 R1 ;global varialle delcare global gantryLevel = 0 global printstoptime = 0 global printcomplete = 0 global holdtime = 0 ; Miscellaneous M115 M115 B1 ;Check status of Can-FD exansion board M911 S19 R22 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss M207 S0.4 R0.0 F3600 T3600 Z1.0 ; set default retraction settings G54 T0 ; select first tool ;G31 K0 ;select Bltouch by default M106 P3 S255 ; turn on lights ;M564 H0 S0; Allow movement outside of max/min and allow movment without homing ;Random Notes--------------------------------------------------------------------------------------------------------------------- ;wget -q https://pkg.duet3d.com/duet3d.gpg ;wget -q https://pkg.duet3d.com/duet3d-unstable.list ;sudo mv duet3d.gpg /etc/apt/trusted.gpg.d/ ;sudo mv duet3d-unstable.list /etc/apt/sources.list.d/duet3d-unstable.list ;sudo chown root:root /etc/apt/trusted.gpg.d/duet3d.gpg ;sudo chown root:root /etc/apt/sources.list.d/duet3d-unstable.list ;sudo rm /etc/apt/sources.list.d/duet3d.list ;sudo apt-get update ;sudo apt-get upgrade ;(may need: sudo apt-get dist-upgrade) ;Webcam ;https://forum.duet3d.com/topic/13604/duet-3-raspberry-pi-camera/6 ;full interface http://voron.local:8080/ ;minimal interface http://voron.local:8080/html/min.php ;accelerometer setup ;adafruit lis3dh ;SDI (MOSI) is SDA(on board) ;SPI.cs3 is CS ;SPI.cs2 is INT ;M955 P0 C"spi.cs2+spi.cs3"
-
@alex-cr thanks. I've updated the firmware binary at https://www.dropbox.com/sh/6fdfjn7fpjnk3vv/AADWZIXsKn5B_GsTauCx8Nsna?dl=0. Please try that one. Whether your daemon.g file succeeds or crashes, please post a new M122 report after running it.
-
Good news, the latest +1 appears to have fixed the firmware crashes.
Unfortunately the line in deamon.g that was causing the crash is now throwing the following alarm.; daemon.g set global.holdtime = state.upTime set global.printcomplete = state.upTime - global.printstoptime
The global variable "printstoptime" is fully defined according to the object model.
And as requested here is the M122.
m122 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.3beta3+1 (2021-04-25 21:40:09) running on Duet 3 MB6HC v0.6 or 1.0 (SBC mode) Board ID: 08DJM-956L2-G43S4-6J1FD-3SJ6T-TB6QH Used output buffers: 1 of 40 (10 max) === RTOS === Static ram: 150800 Dynamic ram: 64488 of which 176 recycled Never used RAM 135872, free system stack 178 words Tasks: SENSORS(delaying,0.0%,70) Linux(resourceWait:,5.7%,266) HEAT(delaying,0.0%,281) Move(notifyWait,0.0%,350) CanReceiv(notifyWait,0.0%,773) CanSender(notifyWait,0.0%,373) CanClock(delaying,0.0%,341) TMC(notifyWait,7.2%,93) MAIN(running,87.0%,924) IDLE(ready,0.0%,29), total 100.0% Owned mutexes: HTTP(MAIN) === Platform === Last reset 00:10:34 ago, cause: software Last software reset at 2021-04-25 20:42, reason: User, none spinning, available RAM 135872, slot 0 Software reset code 0x0012 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0x00000000 SP 0x00000000 Task Linu Freestk 0 n/a Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 Step timer max interval 134 MCU temperature: min 24.9, current 25.5, max 39.7 Supply voltage: min 3.1, current 24.0, max 24.1, under voltage events: 1, over voltage events: 0, power good: yes 12V rail voltage: min 0.4, current 12.2, max 12.2, under voltage events: 0 Heap OK, handles allocated/used 99/4, heap memory allocated/used/recyclable 2048/64/0, gc cycles 0 Driver 0: position 0, standstill, reads 58281, writes 28 timeouts 0, SG min/max 0/0 Driver 1: position 0, standstill, reads 58281, writes 28 timeouts 0, SG min/max 0/0 Driver 2: position 0, standstill, reads 58281, writes 28 timeouts 0, SG min/max 0/0 Driver 3: position 0, standstill, reads 58281, writes 28 timeouts 0, SG min/max 0/0 Driver 4: position 0, standstill, reads 58281, writes 28 timeouts 0, SG min/max 0/0 Driver 5: position 0, standstill, reads 58282, writes 28 timeouts 0, SG min/max 0/0 Date/time: 2021-04-25 20:53:14 Slowest loop: 0.68ms; fastest: 0.04ms === Storage === Free file entries: 10 SD card 0 not detected, interface speed: 37.5MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 Heater 1 is on, I-accum = 0.0 === GCodes === Segments left: 0 Movement lock held by null HTTP* is doing "M122" in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Filament sensors === Extruder 0 sensor: no data received === CAN === Messages queued 5699, send timeouts 15, received 7849, lost 0, longest wait 1ms for reply type 6042, peak Tx sync delay 45775, free buffers 49 (min 48) Last cancelled message type 30 dest 127 === SBC interface === State: 4, failed transfers: 0 Last transfer: 1ms ago RX/TX seq numbers: 23043/23043 SPI underruns 0, overruns 0 Number of disconnects: 0, IAP RAM available 0x2c594 Buffer RX/TX: 0/0-0 === Duet Control Server === Duet Control Server v3.3-b3 Code buffer space: 4096 Configured SPI speed: 8000000 Hz Full transfers per second: 36.43 Codes per second: 0.15 Maximum length of RX/TX data transfers: 5740/936
-
@alex-cr thanks. As you are using SBC I'll ask @chrishamm to look at why the global variable isn't found.
-
Not a problem. Just doing my best to beta test!
-
@alex-cr This problem had to do with the space after the variable name. To work-around this problem you can remove spaces before the '=' from your daemon.g.
I've got a fix ready for this, thanks for your report.
-
Hey @dc42 I installed the firmware you linked to as I was having the same issue as the OP, I'm running MB6HC with SBC. It solved some issues but others came up. I thought that possibly these new issues were related to my TOOL1LC and 2x EXP3HC being not on the "dropbox" firmware too, so I uploaded and installed those versions with M997. The installations took an abnormally long time to complete.
After installing I am unable to communicate with any of the expansion boards and they all flash with this pattern:
3s Pause, three flashes, 1s pause, very fast single flash, 3s pause, four flashes, repeated.
I tried to downgrade the firmwares back to 3.3beta1 from the github, but am unable to communicate with the boards. "Response Timeout" from M997. I tried the reset procedures but the issue persisted. M112 B{tried for all three boards} gave the same Response Timeout error.
All boards appear in the object model browser but list "null" for all values except CAN address.
I can document the issue further when I am with the machine tomorrow, and or create a new thread if you think that would be better.
Cheers,
T -
@tristanryerparke said in 3.3B3 certain lines cause firmware reset:
After installing I am unable to communicate with any of the expansion boards and they all flash with this pattern:
3s Pause, three flashes, 1s pause, very fast single flash, 3s pause, four flashes, repeated.That indicates that the boards are trying to download firmware from the main board, but the main board doesn't have it in the right place. Most likely the firmware files are in the /sys folder on the SD card but not in the /firmware folder which is where the main board will look for them when running 3.3beta3.
Check that you are running Duet Web Control 3.3beta, then upload the tool board and expansion board firmware files again.
-
@dc42 Files were in /firmware and /sys which was why I was really worried originally. Seemed to be a problem with boards retrieving firmware from the Pi4 SD card. I solved the issue by going into standalone mode and restarting the machine. Then the boards were able to request firmware and sync.
All set now,
Thanks -
@dc42 I seem to be having a similar issue.
I downloaded the 3HC and 6HC files from dropbox, uploaded it to the board.
I'm trying to get the accelerometer to work with the printer, so what I did was this:
- Home
- Level gantry (Voron 2.4)
- Send m955 to set up the accelerometer (the response seems to ignore I10 I am sending and keeps reporting orientation 20).
- Set movement to relative with G91
- Trigger the command from the docs with:
G1 X-50 G4 S2 M956 P0.0 S5000 A0 G4 P10 G1 X50 F20000
- Printer moves by -50, then resets. This happens every time now. It doesn't matter if I have the accelerometer hooked up via SPI or i2c. Always happens.
M122 from after the board boots up is as follows:
m122 b0 === Diagnostics === RepRapFirmware for Duet 3 MB6HC version 3.3RC1 (2021-05-01 09:12:50) running on Duet 3 MB6HC v0.6 or 1.0 (standalone mode) Board ID: 08DJM-956L2-G43S4-6JKDA-3SJ6T-1B6GH Used output buffers: 3 of 40 (19 max) === RTOS === Static ram: 150680 Dynamic ram: 92772 of which 116 recycled Never used RAM 107768, free system stack 200 words Tasks: NETWORK(ready,15.7%,218) ETHERNET(notifyWait,0.1%,117) HEAT(delaying,0.0%,345) Move(notifyWait,0.0%,352) CanReceiv(notifyWait,0.0%,911) CanSender(notifyWait,0.0%,373) CanClock(delaying,0.0%,350) TMC(notifyWait,7.2%,93) MAIN(running,76.1%,924) IDLE(ready,0.9%,29), total 100.0% Owned mutexes: HTTP(MAIN) === Platform === Last reset 00:00:12 ago, cause: software Last software reset at 2021-05-01 12:14, reason: HeatTaskStuck, Platform spinning, available RAM 105784, slot 2 Software reset code 0x4140 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0040080f BFAR 0x00000000 SP 0x2043be24 Task ACCE Freestk 334 ok Stack: 00448065 0044805a 610f0000 00000000 407ad03f b5fbe847 bf6d6ea8 00000000 42e80000 f81d6400 3f5cc44b 15873197 3ec9dc39 37533333 43d697a0 00000000 422ba3c7 42288192 00000000 60000010 2043b7c1 2043b7a0 2043b7c1 000000e8 000000ef 00000003 20423f00 Error status: 0x00 Aux0 errors 0,0,0 Aux1 errors 0,0,0 Step timer max interval 133 MCU temperature: min 41.7, current 42.6, max 42.8 Supply voltage: min 24.0, current 24.0, max 24.1, under voltage events: 0, over voltage events: 0, power good: yes 12V rail voltage: min 12.1, current 12.1, max 12.2, under voltage events: 0 Heap OK, handles allocated/used 99/2, heap memory allocated/used/recyclable 2048/26/0, gc cycles 0 Driver 0: position 0, standstill, reads 1504, writes 14 timeouts 0, SG min/max 0/0 Driver 1: position 0, standstill, reads 1504, writes 14 timeouts 0, SG min/max 0/0 Driver 2: position 0, standstill, reads 1505, writes 14 timeouts 0, SG min/max 0/0 Driver 3: position 0, standstill, reads 1505, writes 14 timeouts 0, SG min/max 0/0 Driver 4: position 0, standstill, reads 1505, writes 14 timeouts 0, SG min/max 0/0 Driver 5: position 0, standstill, reads 1505, writes 14 timeouts 0, SG min/max 0/0 Date/time: 2021-05-01 12:15:23 Slowest loop: 5.60ms; fastest: 0.05ms === Storage === Free file entries: 10 SD card 0 detected, interface speed: 25.0MBytes/sec SD card longest read time 3.4ms, write time 0.0ms, max retries 0 === Move === DMs created 125, maxWait 0ms, bed compensation in use: none, comp offset 0.000 === MainDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === AuxDDARing === Scheduled moves 0, completed moves 0, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 0], CDDA state -1 === Heat === Bed heaters = 0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is ready with "m122 b0" in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon is idle in state(s) 0 Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === CAN === Messages queued 97, send timeouts 0, received 57, lost 0, longest wait 1ms for reply type 6042, peak Tx sync delay 206, free buffers 49 (min 48) === Network === Slowest loop: 9.48ms; fastest: 0.02ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions Telnet(0), 0 sessions HTTP sessions: 2 of 8 - Ethernet - State: active Error counts: 0 0 1 0 0 Socket states: 5 2 2 2 2 0 0 0
-
We hope to release 3.3RC1 later today. It includes fixes for these stack overflow issues.