-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: SPI(0) doesn't exist on Nucleo F767ZI #14388
Comments
SPI indices start at 1 on STM32 boards. There is no |
Hello, But thanks for your help, I only tried SPI 0-2 before. Your recommendation encouraged me to try SPI(3), which seems to worked. |
Check the pins your specifying are correct for the SPI channel you're trying to use, stm chips generally only have 1 or 2 pins that can work for each SPI channel. |
Each board has a configuration that specifies which UART/SPI/etc are defined. For the Nucleo F767ZI see here: https://github.com/micropython/micropython/blob/master/ports/stm32/boards/NUCLEO_F767ZI/mpconfigboard.h#L52-L56 Only SPI(3) is defined, on pins PB3, PB4, PB5. |
You should be able to use the other SPI channels too by specifying the pins in the unit call like on your original example. The supported pins for each peripheral on this chip can be found in https://github.com/micropython/micropython/blob/master/ports/stm32/boards/stm32f767_af.csv |
Checks
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
Nucleo F767ZI
MicroPython version
MicroPython v1.22.2
Reproduction
from machine import SPI
spi = SPI(0, sck='D13', miso='D12', mosi='D11')
Expected behaviour
No response
Observed behaviour
Traceback (most recent call last):
File "", line 3, in
ValueError: SPI(0) doesn't exist
Additional Information
No, I've provided everything above.
The text was updated successfully, but these errors were encountered: