hwSPI NRF52
-
Hi
I want to understand how the hwSPI works for the NRF52 and a RFM95 module.
I suppose that I can define more then one SPI interface in the file MyBoardNRF5.h so it looks like
SodaqMoja/SodaqCore-samd (should be updated to the NRF52 pins)#ifdef ENABLE_SPI1 #define SPI_INTERFACES_COUNT 2 #else #define SPI_INTERFACES_COUNT 1 #endif // SPI #define PIN_SPI_MISO (42u) #define PIN_SPI_SS (43u) #define PIN_SPI_MOSI (44u) #define PIN_SPI_SCK (45u) static const uint8_t MISO = PIN_SPI_MISO; static const uint8_t SS = PIN_SPI_SS ; static const uint8_t SS_DFLASH = PIN_SPI_SS ; static const uint8_t MOSI = PIN_SPI_MOSI ; static const uint8_t SCK = PIN_SPI_SCK ; // SPI1 #define PIN_SPI1_MISO (53u) #define PIN_SPI1_SS (54u) #define PIN_SPI1_MOSI (55u) #define PIN_SPI1_SCK (56u) static const uint8_t MISO1 = PIN_SPI1_MISO; static const uint8_t SS1 = PIN_SPI1_SS; static const uint8_t MOSI1 = PIN_SPI1_MOSI; static const uint8_t SCK1 = PIN_SPI1_SCK;
But I don't get how I will init the second SPI bus and point it to the RFM95 module. Guessing it should be define RFM95_SPI SPI1 or something like that?
#if !defined(RFM95_SPI) #define RFM95_SPI hwSPI //!< default SPI #endif
1 out of 1
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
MQTT-Help me understand about the MQTT Gateway.
Development • 2 Mar 2025, 01:44 • dpcons 19 days ago -
Home Assistant/MySensors quirks
Development • 15 days ago • OldSurferDude 15 days ago -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
PJON and Minicore not working
Development • 10 days ago • Trand 10 days ago -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07