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
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login