Is GoPiGo3 SPI Interface Thread-Safe?

Today I saw a GoPiGo3 error - “No SPI response” - for the first time in over three calendar years (21050 hours) of GoPiGo3 object instantiations (roughly 2.5 million).

pi@Carl:~/Carl $ plib/status.py
FATAL ERROR:
GoPiGo3 is not detected.
Traceback (most recent call last):
File “/home/pi/Carl/plib/gopigo3.py”, line 244, in init
board = self.get_board()
File “/home/pi/Carl/plib/gopigo3.py”, line 486, in get_board
raise IOError(“No SPI response”)
OSError: No SPI response

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “plib/status.py”, line 220, in
main()
File “plib/status.py”, line 142, in main
egpg = easygopigo3.EasyGoPiGo3(use_mutex=True)
File “/home/pi/Carl/plib/easygopigo3.py”, line 152, in init
raise e
File “/home/pi/Carl/plib/easygopigo3.py”, line 149, in init
super().init(noinit=noinit)
File “/home/pi/Carl/plib/gopigo3.py”, line 247, in init
raise IOError(“No SPI response. GoPiGo3 with address %d not connected.” % addr)
OSError: No SPI response. GoPiGo3 with address 8 not connected.

===== NO PROBLEM WHEN TRIED AGAIN IMMEDIATELY =====

pi@Carl:~/Carl $ plib/status.py
Starting status.py at 9.59v

********* CARL Basic STATUS *****
2021-09-10 11:03:53 up 18 days, 19:27, 3 users, load average: 0.46, 0.36, 0.36
Battery Voltage: 9.59
5v Supply: 5.07
Estimated Life Remaining: 6 h 1 m
Processor Temp: 44.0’C
Clock Frequency: 700.0 MHz
throttled=0x0
Docking State: Not Docked
Charging State: Not Charging
Distance Sensor: nothing within 90 inches
pi@Carl:~/Carl $ uptime
11:04:06 up 18 days, 19:27, 3 users, load average: 0.36, 0.34, 0.35
pi@Carl:~/Carl $ plib/status.py
Starting status.py at 9.60v

Does anyone know:

  • is the Raspberry Pi SPI interface is thread-safe?
  • is the GoPiGo3 use of the SPI interface thread-safe?
2 Likes

I’ve seen that too, though in my case I assumed it was a corrupted O/S image or an invalid kernel revision for the O/S I was using, caused by my multi-boot experiments.

Hmmm. Interesting!

1 Like