STM32F411 ulora pin allocation problem #12759
-
I have ulora running on both a ESP32 and a PICO and thought I'd try a Blackpill. So, I built the general version using the instructions here: However, I am having trouble setting-up the SPI. Could someone point to a Blackpill example? I am happy to use the SPI pins used in that build, ie I am not trying to change them. The lines that I need to modify are: # baud rate to 5MHz
# self.spi = SPI(self._spi_channel[0], baudrate=5000000,
# sck=Pin(self._spi_channel[1]), mosi=Pin(self._spi_channel[2]), miso=Pin(self._spi_channel[3])) sck/mosi/miso are fixed in pin.csv so I don't think they need to be included. The error I get is How do I find the required syntax for the SPI on the Blackpill? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The Blackpill should be very similar to the Pyboard. Could you change your code example to include imports and replace class references like |
Beta Was this translation helpful? Give feedback.
The Blackpill should be very similar to the Pyboard.
So iirc you have two options: use the pyb module spi or the machine module spi. For some reason I had to use SoftSPI in my works.
I seem to remember I had the same problem then. So this might be worth exploring, even on the Pyboard.
Could you change your code example to include imports and replace class references like
self._spi_channel[1]
with values that are self-consistent. Then we may try it out without reworking and guessing the values.