Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. hwSPI NRF52

hwSPI NRF52

Scheduled Pinned Locked Moved Development
1 Posts 1 Posters 372 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    smilvert
    wrote on last edited by smilvert
    #1

    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 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    14

    Online

    11.7k

    Users

    11.2k

    Topics

    113.1k

    Posts


    Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • MySensors
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular