Code: Select all
print('First line') from pyb import SPI spi = SPI(2, SPI.SLAVE, polarity=0) ch = bytearray('ab') res = spi.send_recv(ch, timeout=1) print(res, ch)
I don't even see the first line printed.
The only way to get back to interacting with the board is to power cycle it.
If I remove the spi.send_recv call then the hardware does not freeze and the script runs to completion.
I have nothing connected to the SPI pins.