mcci-catena / arduino-lmic

LoraWAN-MAC-in-C library, adapted to run under the Arduino environment
https://forum.mcci.io/c/device-software/arduino-lmic/
MIT License
637 stars 207 forks source link

Need to initialize nss pin to HIGH #38

Closed frankleonrose closed 5 years ago

frankleonrose commented 6 years ago

The default state for output pins is LOW, which is active for nss. Users will need at least one call to LMiC initialization code within setup() prior to any other peripheral engaging in SPI communication.

terrillmoore commented 6 years ago

Agreed. This is really an issue with using any devices on a shared SPI bus: all the chip selects must be initialized correctly before any device can be used. In our private BSPs for the Feather M0 LoRa, and for the Catena 4551, we can take care of this at reset time.

But… I believe that there’s a pullup on NSS inside the SX1276, and the digital output is not enabled by default; are you seeing this being driven low?

--Terry

From: Frank Leon Rose [mailto:notifications@github.com] Sent: Wednesday, December 6, 2017 13:16 To: mcci-catena/arduino-lmic arduino-lmic@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [mcci-catena/arduino-lmic] Need to initialize nss pin to HIGH (#38)

The default state for output pins is LOW, which is active for nss. Users will need at least one call to LMiC initialization code within setup() prior to any other peripheral engaging in SPI communication.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mcci-catena/arduino-lmic/issues/38 , or mute the thread https://github.com/notifications/unsubscribe-auth/ASb_7ybZag7Zrjd46HBOF_90i8GGZjZHks5s9tnegaJpZM4Q4XQb . https://github.com/notifications/beacon/ASb_7_sPAHsosn333uaXVfLN1QyIgiveks5s9tnegaJpZM4Q4XQb.gif