Attempt to add extra UART wrecked standard SERCOM configuration - how to recover

Hello fellow MKR users,

I did a foolish thing yesterday. I would appreciate some advice on recovering to the standard setup.

This problem occurred when I copied a program to set up SERCOM to add an extra UART to my MKRNB1500. It was not for a 1500 and I over wrote the 1500 configuration. Initially the Arduino wouldn't even run a blink program. I copied some setup from variant.h and used that in my faulty program. At least then the Arduino would run a blink program. Now I can't communicate with the SARA module so I think the Serial2 (SerialSARA) SERCOM configuration is faulty.

I've tried to program the settings I see in variant.h but it doesn't work. Here are some options and I'd welcome opinions.

  • Continue trying to bash my way through variant.h and variant.cpp setting for the 1500 NB until it works again.

  • Reload the bootloader - not sure if this will achieve anything as I can load programs

  • Find a file to load the standard 1500 NB setup. I've looked but I haven't seen any links to 'standard' Arduino settings.

  • Somebody points out the obvious solution I'm missing.

The other question is about where to post this question. It is really an MKR/SAMD21 question, not specific to the 1500 NB Arduino. I'd like to think anyone with experience with these controllers will see my question. Is this the best place to post the question?

Kind of old, so I'm guessing you figured this out already, but the varaint files can be found here: ArduinoCore-samd/variants/mkrnb1500 at master · arduino/ArduinoCore-samd · GitHub