Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

trying to get another serial port on metro express m4
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

trying to get another serial port on metro express m4

by femyers01 on Mon Mar 23, 2020 5:17 pm

I am trying to get another serial port(uart) to work on the Metro Express M4. Played around with the examples found on the ADAFruit learning pages. I'm using the Arduino IDE. anyway, after following the examples, iI discovered that they were written for the SAMD21 not SAMD51. I played around for a while and was trying to figure out how to get it to work when I discovered an example for the SAMD51 chip down at the bottom of the tutorial. I thought I'd found the answer and tried it out. Whammo, it killed the Metro M4. I didn't understand why so tired another Metro M4, chcih worked fine when I plugged it in to the USB cable. But as soon as I tried to load the sketch, Whammo! It killed the new one as well. I don't know why the metro M4s were killed unless it was something with using SERCOM0. I'd used SERCOM1 with no problems.

Anyway, is there anyway to recover those two Metro M4s that I blew up by loading the example sketch on. They are unresponsive to the usb port looking from the PC. Only thing on is the green power light and the red light flashes once after pressing the reset button but that's it..

Here is the example code I tried to load on the M4s using the latest Arduino IDE on Windows 10.

#define PIN_SERIAL2_RX 30 // PA05
#define PAD_SERIAL2_RX (SERCOM_RX_PAD_1)
#define PIN_SERIAL2_TX 18 // PA04
#define PAD_SERIAL2_TX (UART_TX_PAD_0)

Uart Serial2( &sercom0, PIN_SERIAL2_RX, PIN_SERIAL2_TX, PAD_SERIAL2_RX, PAD_SERIAL2_TX );

Stream *SERIALOUT = &Serial2;

void SERCOM0_0_Handler()
{
Serial2.IrqHandler();
}
void SERCOM0_1_Handler()
{
Serial2.IrqHandler();
}
void SERCOM0_2_Handler()
{
Serial2.IrqHandler();
}
void SERCOM0_3_Handler()
{
Serial2.IrqHandler();
}

Forrest Myers

femyers01
 
Posts: 4
Joined: Mon Jan 21, 2019 7:59 pm

Re: trying to get another serial port on metro express m4

by femyers01 on Wed Mar 25, 2020 3:30 pm

After digging around the various trouble shooting pages on the web, I found one where you could erase and update circuitpython on the m4 express. The first step in the process was to double click the reset button. I did than and, wow, the board came back to life, yea!
I will now go and debug why running the sketch to get a new com port seemed to blow up the device.

Life is good!

femyers01
 
Posts: 4
Joined: Mon Jan 21, 2019 7:59 pm

Please be positive and constructive with your questions and comments.