I am having trouble establishing serial communication with an M0 or M4 express card to a serial monitoring program (written in Xojo) running on my mac.
the code running on the M0 (or M4) will output to the IDE serial monitor just fine. however it will not output to this other monitoring program running on the mac.
As a debug step, I tried running the same Arduino code (example: ASCIItable) and it WILL communicate to the monitoring program IF I use a Metro Express board. It will also communicate with the Serial monitor in the Arduino IDE of course. However running the code on the M0/M4 only works with the Arduino serial monitor, not the external Serial monitor program.
I even tried adding the following suggested code when running the M0 or M4 without luck:
#if defined(ARDUINO_SAMD_ZERO) && defined(SERIAL_PORT_USBVIRTUAL)
// Required for Serial on Zero based boards
#define Serial SERIAL_PORT_USBVIRTUAL
#endif
My external serial monitor program can see the M0/M4 serial port, and I think it connects, because once connected, the IDE serial monitor cannot connect to the board.
Any thoughts? I am stuck at this point...
Thanks,
Matt
Serial comms issues with M0 and M4
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- User_UMjT7KxnxP8YN8
- Posts: 323
- Joined: Tue Jul 17, 2018 1:28 pm
Re: Serial comms issues with M0 and M4
Apologies in advance if I'm telling you something you already know, but the other programs may not come configured for the same serial data format. In KiTTY, for instance (the PuTTY fork I prefer), you have to set the baud rate, data bits, stop bits and parity correctly to get it to work.
Set the baud rate to whatever you have in your Serial.begin(baudRate) call, and the other settings as shown in this image.
Hope that helps.
Set the baud rate to whatever you have in your Serial.begin(baudRate) call, and the other settings as shown in this image.
Hope that helps.
- matty
- Posts: 8
- Joined: Fri Aug 17, 2012 8:26 pm
Re: Serial comms issues with M0 and M4
Yes, I have checked baud rate, parity bits, etc. The smoking gun is that the metro express works fine for this, but the SAMD51 based boards (M0, and M4) do not. The M0 and M4 do communicate fine with the IDE Serial Monitor, but fail with my serial monitor program. Adafruit docs do point out some differences in the documentation here: https://learn.adafruit.com/adafruit-gra ... ches-to-m0
The reason I need to use the M0 or M4 is that I need to store a large amount of data to the flash chip on those boards( see https://learn.adafruit.com/adafruit-met ... -spi-flash ) for my application. I am lighting up 120 NeoPixels from a matrix of about 24,000 pixels
Matt
The reason I need to use the M0 or M4 is that I need to store a large amount of data to the flash chip on those boards( see https://learn.adafruit.com/adafruit-met ... -spi-flash ) for my application. I am lighting up 120 NeoPixels from a matrix of about 24,000 pixels
Matt
- User_UMjT7KxnxP8YN8
- Posts: 323
- Joined: Tue Jul 17, 2018 1:28 pm
Re: Serial comms issues with M0 and M4
I'm not sure what product you mean by "Metro Express". Adafruit's Metro M0 Express boards use the ATSAMD21 chip, while the Metro M4 Express boards use the ATSAMD51 chip.
Do you mean the Metro ESP32-S2 Express?
Do you mean the Metro ESP32-S2 Express?
- matty
- Posts: 8
- Joined: Fri Aug 17, 2012 8:26 pm
Re: Serial comms issues with M0 and M4
sorry, I meant Metro 328 https://www.adafruit.com/product/2488
- User_UMjT7KxnxP8YN8
- Posts: 323
- Joined: Tue Jul 17, 2018 1:28 pm
Re: Serial comms issues with M0 and M4
No problem, except that I've never used that board and don't know how to help. Hopefully one of the Adafruit folks will be able to.
Please be positive and constructive with your questions and comments.