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 507 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

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


    17

    Online

    12.0k

    Users

    11.2k

    Topics

    113.4k

    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