CircuitPython version
Adafruit CircuitPython 7.2.0-alpha.1-132-gba008ddfb on 2022-01-18; Raspberry Pi Zero W with bcm2835
Code/REPL
import board
import busio
def test(n=1_000_000):
bus = busio.SPI(board.SCK, board.MOSI, board.MISO)
with bus as spi:
while not spi.try_lock():
print("no lock")
spi.configure(baudrate=n)
spi.unlock()
print(f"frequency={spi.frequency}")
bus.deinit()
test()
Behavior
It reports the frequency as zero.
I can run test() multiple times on other devices, but on the Pi Zero W the second and later times I run it I get:
File "<stdin>", line 1, in <module>
File "test_spi.py", line 6, in test
ValueError: Invalid pins
Description
Sometimes I get fast SPI (24 MHz). But if I get zero I have to do a hard reset.
Also something isn't getting released by deinit().
I'm trying to use the PiTFT 1.14" display. I have to cycle power until I get the fast SPI bus.
Additional information
No response
CircuitPython version
Code/REPL
Behavior
It reports the frequency as zero.
I can run
test()multiple times on other devices, but on the Pi Zero W the second and later times I run it I get:Description
Sometimes I get fast SPI (24 MHz). But if I get zero I have to do a hard reset.
Also something isn't getting released by
deinit().I'm trying to use the PiTFT 1.14" display. I have to cycle power until I get the fast SPI bus.
Additional information
No response