Using Serial Monitor with Native Port

So far, I've only been able to use the Serial Monitor when I use the Programmer Port to talk to the Zero. If I use the Native Port, nothing I print in the sketch seems to print out in the Serial Monitor window. Is this by design, or am I missing something?


did you try the serial1 function as well ?

on the updated product page there is written a lot about the serial ports:

Atmel Embedded Debugger:

The Atmel Embedded Debugger (EDBG) implements a JTAG interface in order to program the on-board SAMD21 and is also connected to hardware serial of the microcontroller. This means that the ‘Serial’ class responds to the programming port of the board. The Arduino Zero has been designed in collaboration with ATMEL, and the on-board EDBG can be used through ATMEL Studio to get full access to the microcontroller memories to help debug your code.


in contrast to some Arduino boards (e.g. Uno), when you open the serial monitor and the board is connected through the Programming Port the board does not automatically reset. You can reset the board manually if you wish to restart your sketch, for example in order to see something that is printed in the setup() function.

Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the Serial1 class.

reading that,
there is no way yet to use the native port as serial monitor, I think (?)
maybe later there will be introduced some “serialUSB”-class or something like that ?
(“virtual USB” like on the leonardo ?)

To see data on the Native port you must use SerialUSB

So to recap we have:

Serial - Programming Port (the path is SAMD->uart->EDBG->usb->PC) Serial1 - Serial uart on pins 0 and 1 SerialUSB - Native Port, this is an emulated serial port (USB-CDC)

If you are using SerialUSB and you want to see the very first data sent by the micro it's handy to put this snippet of code at the beginning of the sketch to make the CPU wait for someone to open the serial monitor:

  while (!SerialUSB) {
    ; // wait for serial port to connect

of course if you use this trick the sketch will not start until you open the serial monitor (i.e. it won't work standalone).

Dirk67: on the updated product page there is written a lot about the serial ports: [.....] there is no way yet to use the native port as serial monitor, I think (?) USB" like on the leonardo ?)

Dirk, you're right the doc page must be updated, I'll keep a note for that, thanks for spotting this out!

I think on the “Guide” page (“getting started”) it is written right (?) :

Indeed it is in the getting started, but I guess it should be mentioned also on the product page.

I'm using the native port as emulated serial port (USB-CDC) with "SerialUSB" to write/read data from Serial Monitor. When I send a first message this code works well, but, when I send some others messages, the recived data are lost as if the buffer does not supply a message.

Here is my simple code:

void setup() {

SerialUSB.begin(115200); while (!SerialUSB) ;


void loop() { String aux = " "; SerialUSB.flush(); while( SerialUSB.available() > 0 ) { char c =; aux += c; } if(aux != " ") SerialUSB.println(aux);



I solved my problem comment this line code in samd21_device.c:

uint8_t UDD_Recv_data(uint32_t ep, uint32_t len) { TRACE_DEVICE(printf("=> UDD_Recvdata : ep=%d\r\n", (char)ep);)

-> //if (len>64) len=64; usb_endpoint_table[ep].DeviceDescBank[0].ADDR.reg = (uint32_t)&udd_ep_out_cache_buffer[ep]; -> //usb_endpoint_table[ep].DeviceDescBank[0].PCKSIZE.bit.MULTI_PACKET_SIZE = len; usb_endpoint_table[ep].DeviceDescBank[0].PCKSIZE.bit.BYTE_COUNT = 0; udd_OUT_transfer_allowed(ep); TRACE_DEVICE(printf("=> UDD_Recv_data : data=%lu\r\n", (unsigned long)data);)

/* Wait for transfer to complete / while (!udd_is_OUT_transf_cplt(ep)); / Clear Transfer complete 0 flag */ udd_clear_OUT_transf_cplt(ep);

return udd_ep_out_cache_buffer[ep][0]; }

I discovered that when sending a string with a size x, the next string of the same size was read correctly. But if the next string had different size was not read correctly. So I commented the line where it was setted the size of the string to be read, getting this with a constant size. Now I have a 64 bytes size string that I can read without problems.

Hi Rfuzer,

thank you for sharing your solution, that's really valuable!

The UDD_Recv_data function has definitely a problem, we are investigating for a final fix.


Did Rfuzer's fix get loaded into the Arduino core yet?

EDIT: As of Arduino 1.6.5, it does not appear to be in the core.

-Adam J.