Adafruit Grand Central M4, multiple serial devices (Serial2, Serial3, etc)

Hi, I've switched my projects from Mega 2560's to Grand Central M4, as I need multiple serial devices (two in addition to USB), in addition to a dozen I/O pins. I can't find a clear suggestion on how to configure the SERCOMs for this purpose, so that I can use something like "Serial" on TX2/RX2 and TX3/RX3.

Any suggestions?

Did you try?

Serial1.begin(9600);
Serial2.begin(9600);

Did you try?

Serial1.begin(9600);
Serial2.begin(9600);

Have you? They're not defined. See attached.

"Serial2 not declared in this scope."

I admit that I posted too quickly, and I will now go through Adafruit's SERCOM docs, but ummm yes, that's the very basis for my question.

But NVM, I'll delete this thread, it was premature, at minimum.

tomicdesu:
Have you? They're not defined. See attached.

No, I do not own the board. Sometimes the easy answer is the right one. Not in this case. :confused:

I now checked the variant.h file in the following folder and only Serial1 is defined. There are 8 SERCOMs defined as well.

..\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.5.14\variants\grand_central_m4

tomicdesu:
But NVM, I'll delete this thread, it was premature, at minimum.

Don't. Can you check whether the following link would help solve your issue. If yes, just add a few notes for others that might read this in the future. A short example might help somebody.

OK cool, thanks. I'm debugging this, and other issues, over on the Adafruit [ product specific ] forum. Turns out that defining the missing Serial2, Serial3 devices is fairly straightforward (Serial2 and Serial3 on Adafruit Grand Central M4 - adafruit industries) but now I'm having hangs at what I suspect at transmit-buffer-empty events as it's bit-rate-dependent). Oh fun.

There is also a change in [ what I think is ] unspecified behavior: On Grand Central, the Serial objet takes over a second to start up. Might be bootloader or USB or... my ignorance, etc. Grand Central M4, Arduino compilation or compat issues - adafruit industries

The apparent bit-rate-dependent problem is open here Grand Central M4, Serial2 tx hangs, bit rate dependent - adafruit industries Of course and and all of these could end up being my own stupid misteaks. I prefer those, actually, as fixes are immediate (once I get over myself).

As they used to say, news at 11.

tom