Problem with SPI on Arduino IDE

Working libraries, libraries being ported and related hardware
Post Reply
Astroghost
Posts: 1
Joined: Sat Feb 08, 2020 6:12 pm

Problem with SPI on Arduino IDE

Post by Astroghost »

I all ,

i can't get an RFM95W LORA Module working with an STM32 L432KC board.
The library working with it is https://github.com/matthijskooijman/arduino-lmic
What are the default SPI ports compatible with arduino on this board

MISO --> PB_5 ?
MOSI --> PB_4 ?
SCLK --> PB_3 ?
SS --> PA_4 ?

I've the same problem with an epaper screen , impossible to make it working with PI on this board ( L432KC)
For example it work with an NUCLEO64 L476RG

François

User avatar
fpiSTM
Posts: 194
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 4
Location: Le Mans
Contact:

Re: Problem with SPI on Arduino IDE

Post by fpiSTM »

By default SPI instance use this:

https://github.com/stm32duino/Arduino_C ... #L180-L202

Code: Select all

// Default for Arduino connector compatibility
// SPI Definitions
#ifndef PIN_SPI_SS
#define PIN_SPI_SS                  10
#endif
#ifndef PIN_SPI_SS1
#define PIN_SPI_SS1                 4
#endif
#ifndef PIN_SPI_SS2
#define PIN_SPI_SS2                 7
#endif
#ifndef PIN_SPI_SS3
#define PIN_SPI_SS3                 8
#endif
#ifndef PIN_SPI_MOSI
#define PIN_SPI_MOSI                11
#endif
#ifndef PIN_SPI_MISO
#define PIN_SPI_MISO                12
#endif
#ifndef PIN_SPI_SCK
#define PIN_SPI_SCK                 13
#endif
In case of Nucleo L432KC:
https://github.com/stm32duino/Arduino_C ... .h#L40-L43

Code: Select all

#define PA11 10
#define PB5  11
#define PB4  12
#define PB3  13 // LED
So your pin description seems not correct.

Post Reply

Return to “Libraries & Hardware”