[RRF 3.5beta2] SPI communication does not work
-
The SPI communication does not work, I have installed two DHT22 sensors and an external SD to read print files and nothing works. This works perfectly in older versions.
M122:
=== Diagnostics ===
RepRapFirmware for Duet 3 MB6HC version 3.5beta2 (2022-12-23 18:27:08) running on Duet 3 MB6HC v1.01 (standalone mode)
Board ID: 0JD2M-999AL-D2PS0-6J9D8-3S46N-9NKV1
Used output buffers: 1 of 40 (38 max)
=== RTOS ===
Static ram: 151524
Dynamic ram: 109880 of which 0 recycled
Never used RAM 86268, free system stack 146 words
Tasks: NETWORK(ready,445.5%,209) ETHERNET(notifyWait,2.6%,401) HEAT(notifyWait,0.3%,307) Move(notifyWait,0.0%,258) CanReceiv(notifyWait,0.9%,773) CanSender(notifyWait,0.0%,335) CanClock(delaying,0.1%,340) TMC(notifyWait,107.9%,90) MAIN(running,172.0%,953) IDLE(ready,2.0%,30), total 731.4%
Owned mutexes:
=== Platform ===
Last reset 03:26:00 ago, cause: software
Last software reset at 2023-03-22 09:50, reason: User, GCodes spinning, available RAM 86228, slot 2
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0044a000 BFAR 0x00000000 SP 0x00000000 Task MAIN Freestk 0 n/a
Error status: 0x00
Aux0 errors 0,11,0
Step timer max interval 236
MCU temperature: min 35.6, current 40.0, max 40.1
Supply voltage: min 23.8, current 23.8, max 23.9, under voltage events: 0, over voltage events: 0, power good: yes
12V rail voltage: min 12.0, current 12.0, max 12.1, under voltage events: 0
Heap OK, handles allocated/used 99/47, heap memory allocated/used/recyclable 2048/564/120, gc cycles 33
Events: 2 queued, 2 completed
Driver 0: standstill, SG min 0, mspos 40, reads 22871, writes 35 timeouts 0
Driver 1: standstill, SG min 0, mspos 904, reads 22876, writes 35 timeouts 0
Driver 2: standstill, SG min 0, mspos 200, reads 22888, writes 23 timeouts 0
Driver 3: standstill, SG min n/a, mspos 360, reads 22894, writes 17 timeouts 0
Driver 4: standstill, SG min n/a, mspos 8, reads 22901, writes 11 timeouts 0
Driver 5: standstill, SG min n/a, mspos 8, reads 22901, writes 11 timeouts 0
Date/time: 2023-03-22 13:16:10
Slowest loop: 10.27ms; fastest: 0.05ms
=== Storage ===
Free file entries: 9
SD card 0 detected, interface speed: 25.0MBytes/sec
SD card longest read time 0.6ms, write time 3.5ms, max retries 0
=== Move ===
DMs created 125, segments created 6, maxWait 7791519ms, bed compensation in use: none, comp offset 0.000
no step interrupt scheduled
=== DDARing 0 ===
Scheduled moves 77, completed 77, hiccups 0, stepErrors 0, LaErrors 0, Underruns [0, 0, 1], CDDA state -1
=== DDARing 1 ===
Scheduled moves 0, completed 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, chamber heaters 5 10 12 -1, ordering errs 0
Heater 2 is on, I-accum = 0.0
Heater 5 is on, I-accum = 0.0
=== GCodes ===
Movement locks held by null, null
HTTP is idle 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
File2 is idle in state(s) 0
Queue2 is idle in state(s) 0
Q0 segments left 0, axes/extruders owned 0x0800003
Code queue 0 is empty
Q1 segments left 0, axes/extruders owned 0x0000000
Code queue 1 is empty
=== CAN ===
Messages queued 111199, received 739955, lost 0, boc 0
Longest wait 3ms for reply type 6053, peak Tx sync delay 278, free buffers 50 (min 49), ts 61801/61800/0
Tx timeouts 0,0,0,0,0,0
=== Network ===
Slowest loop: 30.86ms; fastest: 0.03ms
Responder states: HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0) Telnet(0)
HTTP sessions: 2 of 8
= Ethernet =
State: active
Error counts: 0 0 0 0 0 0
Socket states: 5 2 2 2 2 0 0 0
=== Multicast handler ===
Responder is inactive, messages received 0, responses 0Firmware: 3.5beta2
Web server: 3.5beta1
Board: 6HC (standalone mode)
Core XY -
@Yordan said in [RRF 3.5beta2] SPI communication does not work:
I have installed two DHT22 sensors and an external SD to read print files and nothing works.
Can you be more specific about what doesn't work?
-
I have been doing some more testing, the external SD card works fine (it was a problem with my configuration), but the DHT22 sensors do not work, when the machine starts up it seems to read the first value and then it never updates the value again, it just freezes.
I have tried those two models of DHT22In version 3.4.5 only Aosong model (red) works, Asair model (blue) works for a while and then "Fault" error pops up. In version 3.5beta2 none works directly.
By the way, the Aosong models are practically impossible to get, now there is only Asair and they don't work well in any version. -
@Yordan Does M308 S10 or M398 S12 provide any information (it should in theory report the status of the device)?
If you are looking for an alternative sensor then I think 3.5 added support for the bme280 sensors which may be of interest?
-
Thanks for your attention
This is the information that the board gives when putting the M308 S10.
I have also tried DHT21 with the same results.
I cannot use the bme280, since the machine is not prepared for this purpose (wiring issue). -
This post is deleted! -
@Yordan That doesn't seem to be showing any sort of error, was it working at that point? If you run M308 S10 multiple times do you see that temperature reading change? How does the temperature reading you are seeing from M308 S10 relate to the "frozen" value you see is it the same?
You mentioned above that thsi works with 3.4.5 was that on the same board and hardware setup? Any changes other than the firmware version?
Oh and just to clarify things a DHT22 (and DHT21) sensor does not use SPI communications it uses a single wire protocol (described in the datasheet), so the problems you are seeing are not related to SPI.
-
No, it wasn't working at the time I shipped the M308, but it doesn't work from the beginning even though it doesn't give an error.
I run several times M308 in version 3.4.5:
I run several times M308 in version 3.5.beta2:
In the old version it does change the reading, in the new one it doesn't. The values displayed by the M308 and those displayed on the web server are exactly the same.
Yes, everything runs on the same board and same hardware, nothing has been changed except the firmware and the web server. I have tried other versions of web server with firmware 3.5beta2 and it still does not work, so it can be deduced that it is from the firmware of the board.
Yes, it's not SPI communication, but it's similar and it's connected to the same port. -
@Yordan Please could you try upgrading to 3.5beta3 and see if the issue is resolved.
-
@Yordan Thanks for reporting this, I can confirm this bug. I am working on a fix.
Edit: Now fixed, we'll provide this as part of the next RRF 3.5 beta.