Modified variant.h/cpp for custom board ATSAMD21G18A

Hi,
I designed an own pcb with an ATSAMD21G18A and used the Zero board configuration where I modified varian.h and variant.cpp as I needed a different pin configuaration, also eg. removed USB so I had 2 more pins available.
It worked so far at least all the general Out/Inputs but I wanted to use now SPI for a RFM95 module which doesn’t work.

I have SPI connected to:
SCK: pin 20(PB11)
MOSI: pin19(PB10)
MISO: pin21(PA12)
NSS: pin24, D5
RFM95 RESET: pin14, D3
DI0: pin26, D6

LoRa.setPins(5, 3, 6); //SAMD21 set CS, reset, IRQ pin

Could somebody has a look at my two files if I made a mistake there?
Thanks :slight_smile:

GPIOs used
#define LDR_ADC_PIN 24      // PA2,  3:IC pin
#define ENCODER_A_PIN 25    // PB8,  7:IC pin
#define ENCODER_B_PIN 26    // PB9,  8:IC pin
#define LED_PIN 34          // PA25, 34:IC pin
#define SQW_PIN 27   // PA4,  9:IC pin 
#define TRIGGER_PIN 28  // PA5,  10:IC pin 
#define SWITCH_B 8   // PA6,  11:IC pin
#define SWITCH_A 9   // PA7,  12:IC pin
#define EN_5V_PIN 2         // PA8,  13:IC pin
#define RFM_RST_PIN 3       // PA9,  14:IC pin
#define TRIGGER_A_PIN 1     // PA10, 15:IC pin
#define TRIGGER_B_PIN 0     // PA11, 16:IC pin
#define ENCODER_TASTE 43    // PA13, 22:IC pin
#define LIGHT_PIN 4         // PA14, 23:IC pin
#define RFM_NSS 5           // PA15, 24:IC pin
#define A6_POWER_PIN 11  // PA16, 25:IC pin
#define X_SYNC_EN 13        // PA17, 26:IC pin
#define SHUTTER_PIN 10      // PA18, 27:IC pin
#define FOKUS_PIN 12        // PA19, 28:IC pin
#define RFM_INT_PIN 6       // PA20, 29:IC pin
#define EN_3V3_PIN 7        // PA21, 30:IC pin
#define BUZZER_PIN  31      // PA27, 39:IC pin
#define U_SENS_PIN 29       // PB2,  47:IC pin
#define RELAIS_RESET_PIN 30 // PB3,  48:IC pin
#define U_SENSE_EN 33       // PA24, 33:IC pin

variant.cpp (19.9 KB)

variant.h (7 KB)