← index #9230Issue #11919
Off-topic · high · value 0.277
QUERY · ISSUE

TypeError: expecting an SPI object

openby Meekdaiopened 2022-09-07updated 2022-09-07
docsport-rp2

I compiled the latest micropython firmware for my custom board with W5500 .
Compilation process:
https://github.com/Meekdai/micropython-actions/actions/runs/3005187684

After download firmware , it can run normally.

MicroPython v1.19.1-375-ge90b85cc9 on 2022-09-07; MP405WS with STM32F405RG
Type "help()" for more information.
>>>

But an error occurs when using network.WIZNET5K.

>>> import network
>>> nic=network.WIZNET5K(pyb.SPI(2), pyb.Pin.board.Y5, pyb.Pin.board.Y1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expecting an SPI object
>>>
CANDIDATE · ISSUE

ValueError: SPI(2) doesn't exist after build ESP32 with IDF_5.0.2

closedby styliteropened 2023-07-02updated 2023-07-25
bugport-esp32

I build firmware.bin sucessfully for ESP32 GENERIC with IDF_5.0.2.

There is an error when use SPI:

from machine import SPI
spi = SPI(2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: SPI(2) doesn't exist
SPI(1)
SPI(id=1, baudrate=500000, polarity=0, phase=0, bits=8, firstbit=0, sck=14, mosi=13, miso=12)

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied