Samd21 mini wired to rfm95

Ok, thanks very much for your help sofar, I’ll search the other fora for relevant hints.

I discovered that it looks almost exactly the same as an Samd21 M0-mini from RobotDyn.com The only difference I saw was that on my board the ICSP connector is not mounted. The pinout can be found here.
Tips on how to use it in the Arduino IDE over here. I use it as an Arduino Zero (Native USB port) in the IDE. I uploaded this sketch which makes the TX and RX Leds blink. So both the board and the IDE do work. Pins used are 25 and 26, as there is no Led available to the user (normally pin 13?).
For printing to Serial you have to use SerialUSB.print or SerialUSB.println instead of Serial.print

Lora does not yet work. Must I use the MISO, MOSI, SCK and Reset of the ICSP header instead of DIO pins? And if so, should MISO of the RFM connect to MOSI of the SAMD and vice versa? I guess it is all software defined in the LMIC library.

I had to use SPI from the ICSP header on top, have not yet found / looked into possibility of using (GP)IO pins on the side of the board for hardware SPI yet.
Fyi, DIO is usually the name used for the (D)IO pins on the LoRa module.

Issue is solved now! I connected MISO, MOSI, SCK and RST to the pins with the same names of the ICSP connector and changed the pinmap to:

const lmic_pinmap lmic_pins = {
.nss = 6, // chip select on SAMD21 mini
.rxtx = LMIC_UNUSED_PIN,
.rst = LMIC_UNUSED_PIN,
.dio = {2, 3, 4}, //DIO0, DIO1 and DIO2 connected
};

Thanks to you all, for the tips given :grinning: :sweat_smile:

2 Likes

Good morning @Roelvdv,
I had the same issue with arduino nano IoT 33 as it is based on SAMD21 MCU I found a solution based on your statements. Thank you so much for your great guidance.
There is the same issue also in another page of forum (LoRa Basics MAC on Arduino 33 Nano - #28 by descartes).
I put a video also next days in my youtube channel it could be helpful:
Make Lorawan node with SAMD microcontroller based boards using LMIC lorawan library - YouTube.
Grateful and best wishes,
Amin TAYEBI

You replied to a two year old thread …