how to use Serial1 on Artemis nano?

Given that someone else also complained about Serial speed setting I have bought an Artemis Nano.

Compiled your example and … now I got the same problem as you. I could not set the speed for Serial and Serial1 independent from each other and the data is showing up BOTH on Serial as well as Serial1.

I have been able to find the root cause and solution.

An Apollo3 chip has 2 uarts : UART0 and UART1. When a Serial instance is created, based on the provided TX and RX pad, a lookup is performed to decide which UART to use.

First, the Serial-instance is created (TX = 48 / RX= 49) and based on the lookup UART0 is assigned. Then the Serial1-instance is created (TX=39, RX =40), but now DUE TO AN ERROR IN THE LOOKUP TABLE, it is ALSO assigned to UART0.

In the same lookup table (PeripheralPins.c) there are already entries to assign (TX=39, RX =40) to UART1. So I commented-out the 2 lines that enable UART0 assigment. Serial1 is now assigned to UART1 and it now works as expected.

The change requires a new Artemis-Nano pre-build archive for Mbed, which I have created.

Go to  the directory :

Windows :  <userdir>\AppData\Local\Arduino15\packages\Sparkfun\hardware\apollo3\2.2.1\variants\SFE_ARTEMIS_NANO\mbed

Ubuntu/Linux:~/.arduino15/packages/SparkFun/hardware/apollo3/2.2.1/variants/SFE_ARTEMIS_NANO/mbed

There is the archive file called libmbed-os.a.
If you want you can make a safety rename or copy.

Now UNZIP the attached  libmbed-os.zip in this folder to get a updated  an libmbed-os.a and recompile your sketch .
 All should be working now.

Note 1: Why I did not see this on any of the other boards ? Because they use TX=24 / RX=25 for Serial1, which in the table can only be assigned to UART1.

Note 2: I have made a github bug report : https://github.com/sparkfun/Arduino_Apollo3/issues/474

libmbed-os.zip (1.94 MB)