[Solved][Duet2Wifi] WiFi SPI Timeout after removing SBC Mod
-
I have a pair of Duet Wifi 2 boards (1.02 and 1.03) that were modded with this SBC mod. I'm aware it's almost certainly voided the warranty (which would have run out anyway), so just looking for advice/pointers.
I've upgraded to Duet 3 Minis, so was going to sell these two boards. In preparation, I removed the mod board and got everything reset to factory. I reflashed the firmware with BOSSA, loaded up a new SD card, and ran
M997 S1
to flash the Wifi firmware.Unfortunately on both boards I just get SPI timeouts when trying to do anything with the WiFi. I thought I might have somehow borked the ESP boards so I replaced them (with ESP-07S, as Farnell sent out those instead of the 12S), reflashed with
M997 S1
but still the same SPI timeout.Can't see any solder bridges, or any other components that may have shifted/desoldered.
I've tried the latest 3.2 and 3.3 firmwares to no avail. Any ideas what to check, or what may be the cause?
RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 Printer is now online. >>>M122 SENDING:M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet WiFi 1.02 or later Board ID: 08DGM-956GU-DJMSN-6J9FL-3SD6S-TTRHH Used output buffers: 1 of 24 (1 max) === RTOS === Static ram: 23876 Dynamic ram: 73544 of which 12 recycled Never used RAM 16984, free system stack 193 words Tasks: NETWORK(ready,1.9%,517) HEAT(delaying,0.0%,391) Move(notifyWait,0.1%,364) MAIN(running,66.1%,639) IDLE(ready,31.9%,29), total 100.0% Owned mutexes: USB(MAIN) === Platform === Last reset 00:00:12 ago, cause: reset button or watchdog Last software reset at 2021-09-09 14:06, reason: User, GCodes spinning, available RAM 15512, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 [ERROR] Error status: 0x00 Step timer max interval 0 MCU temperature: min 36.9, current 37.1, max 37.3 Supply voltage: min 1.7, current 1.7, max 1.7, under voltage events: 0, over voltage events: 0, power good: no Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Driver 0: position 0, ok, SG min/max not available Driver 1: position 0, ok, SG min/max not available Driver 2: position 0, ok, SG min/max not available Driver 3: position 0, ok, SG min/max not available Driver 4: position 0, ok, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 1970-01-01 00:00:00 Cache data hit count 716504001 Slowest loop: 0.22ms; fastest: 0.13ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 12.0MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 83, 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 = -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is ready with "M122" 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 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Network === Slowest loop: 0.18ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 0 of 8 - WiFi - Network state is disabled WiFi module is disabled Failed messages: pending 2779096485, notready 2779096485, noresp 2779096485 Socket states: 0 0 0 0 0 0 0 0 >>>M552 S1 SENDING:M552 S1 WiFi module started WiFi reported error: no known networks found WiFi module is idle >>>M587 S"IoT_2G" P"********" SENDING:M587 S"IoT_2G" P"********" Error: M587: Failed to add SSID to remembered list: SPI timeout [ERROR] Error: M587: Failed to add SSID to remembered list: SPI timeout Error retrieving WiFi status message: SPI timeout [ERROR] Error retrieving WiFi status message: SPI timeout WiFi module is idle Failed to change WiFi mode: SPI timeout
>>>M552 S1 SENDING:M552 S1 WiFi module started >>>M122 SENDING:M122 === Diagnostics === RepRapFirmware for Duet 2 WiFi/Ethernet version 3.3 (2021-06-15 21:44:54) running on Duet WiFi 1.02 or later Board ID: 08DGM-956GU-DJMSN-6J9FL-3SD6S-TTRHH Used output buffers: 1 of 24 (1 max) === RTOS === Static ram: 23876 Dynamic ram: 73544 of which 12 recycled Never used RAM 16984, free system stack 193 words Tasks: NETWORK(ready,3.9%,461) HEAT(delaying,0.0%,391) Move(notifyWait,0.1%,364) MAIN(running,73.4%,639) IDLE(ready,22.6%,29), total 100.0% Owned mutexes: USB(MAIN) === Platform === Last reset 00:00:17 ago, cause: reset button or watchdog Last software reset at 2021-09-09 14:06, reason: User, GCodes spinning, available RAM 15512, slot 0 Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x00400000 BFAR 0xe000ed38 SP 0x00000000 Task MAIN Freestk 0 n/a Error status: 0x00 [ERROR] Error status: 0x00 Step timer max interval 0 MCU temperature: min 36.5, current 38.1, max 38.3 Supply voltage: min 1.7, current 1.7, max 1.7, under voltage events: 0, over voltage events: 0, power good: no Heap OK, handles allocated/used 0/0, heap memory allocated/used/recyclable 0/0/0, gc cycles 0 Driver 0: position 0, ok, SG min/max not available Driver 1: position 0, ok, SG min/max not available Driver 2: position 0, ok, SG min/max not available Driver 3: position 0, ok, SG min/max not available Driver 4: position 0, ok, SG min/max not available Driver 5: position 0 Driver 6: position 0 Driver 7: position 0 Driver 8: position 0 Driver 9: position 0 Driver 10: position 0 Driver 11: position 0 Date/time: 1970-01-01 00:00:00 Cache data hit count 920185181 Slowest loop: 99.74ms; fastest: 0.12ms I2C nak errors 0, send timeouts 0, receive timeouts 0, finishTimeouts 0, resets 0 === Storage === Free file entries: 10 SD card 0 detected, interface speed: 12.0MBytes/sec SD card longest read time 0.0ms, write time 0.0ms, max retries 0 === Move === DMs created 83, 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 = -1 -1 -1 -1, chamberHeaters = -1 -1 -1 -1 === GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is ready with "M122" 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 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty. === Network === Slowest loop: 1.28ms; fastest: 0.00ms Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0), 0 sessions HTTP sessions: 0 of 8 - WiFi - Network state is changingMode WiFi module is idle Failed messages: pending 0, notready 0, noresp 0 Failed to get WiFi status Socket states: 0 0 0 0 0 0 0 0 Error retrieving WiFi status message: SPI timeout [ERROR] Error retrieving WiFi status message: SPI timeout WiFi module is idle Failed to change WiFi mode: SPI timeout
-
@keyz182 did the firmware flash sucessfully?
-
Connecting... Printer is now online. >>>M997 S1 SENDING:M997 S1 Trying to connect at 230400 baud: success Erasing 4096 bytes... Erasing 196608 bytes... Uploading file... 5% complete 10% complete 15% complete 20% complete 25% complete 30% complete 35% complete 40% complete 45% complete 50% complete 55% complete 60% complete 65% complete 70% complete 75% complete 80% complete 85% complete 90% complete 95% complete Upload successful
And for good measure I did an
M997 S0
too which correctly reports 3.3 after a restart andM122
. -
@keyz182 ok to the UART comms to the module is working. Have a look at the schematic here
you can test the continuity for the SPI pins
-
@t3p3tony Continuity to the MCU for MOSI, MISO and SPCK, any other pins I should check?
-
@t3p3tony There's continuity on all three.
-
@keyz182 also the ESP_DATA_RDY and NPCS0
-
@keyz182 is the SPI timeout message consistent? That message is sometimes produced spuriously, especially when sending a M587 command for the first time after re-flashing the WiFi firmware.
-
@t3p3tony Continuity (through 2.2KOhm) on both which seems to tally up with the schematic.
@dc42 It's consistent. Right after a flash, leaving it a while, rebooting, etc, all the same as soon as I try
M587
orM122
.Connecting... Printer is now online. >>>M552 S1 SENDING:M552 S1 WiFi module started WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle >>>M587 S"IoT_2G" P"********" SENDING:M587 S"IoT_2G" P"********" Error: M587: Failed to add SSID to remembered list: SPI timeout [ERROR] Error: M587: Failed to add SSID to remembered list: SPI timeout Error retrieving WiFi status message: SPI timeout [ERROR] Error retrieving WiFi status message: SPI timeout WiFi module is idle Failed to change WiFi mode: SPI timeout >>>M552 S-1 SENDING:M552 S-1 >>>M552 S0 SENDING:M552 S0 WiFi module started >>>M552 S1 SENDING:M552 S1 WiFi reported error: no known networks found WiFi module is idle WiFi reported error: no known networks found WiFi module is idle >>>M587 S"IoT_2G" P"********" SENDING:M587 S"IoT_2G" P"********" Error: M587: Failed to add SSID to remembered list: SPI timeout [ERROR] Error: M587: Failed to add SSID to remembered list: SPI timeout Error retrieving WiFi status message: SPI timeout [ERROR] Error retrieving WiFi status message: SPI timeout WiFi module is idle Failed to change WiFi mode: SPI timeout
-
@keyz182 can you try sending M552 S0 before trying M587?
I find its sometimes not happy sending the wifi details when in S1 -
@jay_s_uk OK, that worked. Is that documented behavior that I've just misread? I swear I've always done
M552 S1
before anyM587
commands. -
@keyz182 the step by step guide does say to put it in S0 mode first.
Its also they way I've documented it on all the STM32/LPC port support pages. -
@t3p3tony what do ESP_DATA_RDY and NPCS0 for? can this to pin connect to GND or 3.3V pull up, thanks for reply