This got me thinking last night. And it turns out that you were right!
About 10 days ago I installed Saleae’s new version of the software that you use with their logic analyzers. It’s called Logic2 while the original software was called Logic. Well it must not be a mature software product yet because it seems that every time I start the software, it yells at me to install an updated version. There’s a good-sized pop-up dialog that appears in the lower left corner of their application, and it’s sort of annoying because it’s somewhat obtrusive. So a couple of days ago I decided to just go ahead and finally install the update…so I did. Then I did the tests where you saw those weird errors, and thought this was a potential baud rate issue. So this morning I explored it a bit, and what do you know: It WAS a baud rate issue!
It appears that their application keeps some preferences around–like it remembers whatever decoders you had set up in the older version, for example. In my case, I had two serial decoders: One each for the Rx and Tx pins. And they were configured for a baud rate of 115200, and it did work when I provided the screen shots where we had seen the framing errors along with partial ASCII output. But apparently when the update got installed, several settings seem to have reverted to the default for the decoders. This includes a baud rate of 9600. This would not have been a problem were it not for the fact that baud rate is hidden inside a menu in the decoder set-up wizard–because otherwise it would be quite apparent from a glance. But to see the baud rate in their software you have to go into the “edit” menu for each decoder, and that’s hidden a level in. So I just plain missed it, and since the software update apparently reset the baud rate (and some other things, actually) to default…I was using the WRONG baud rate. So it was definitely a great catch on your part @wx4cb.
So then (finally)…I did re-set the baud rate to 115200 in the Logic2 software, and checked both the Serial1 and Serial2 port Tx output. It seems to be perfect! I examined 15-20 print output packets for each port, and didn’t find one framing error in the bunch. See these screen shots:
Thus it does indeed appear that the updated library (v1.7.2) has likely fixed the framing errors that I had been seeing here on the logic analyzer. Since none were seen at 115200 baud, I didn’t even both to change the code to check for any at slower baud rates.
NOTE: I do still get IDE (Arduino v1.8.12) freezing when I try to close it after multiple attempts to send data over the SerialUSB port. It does seem to close eventually now though–but it takes like 15-20 seconds to do so. In the past (with the older Seeed Studios v1.0.0 library) I would have to force-kill the IDE as leaving it for a few minutes still wouldn’t shut the application. The only way I could kill the serial monitor was to force-kill it. Thus I would say I’m seeing a bit of an improvement on that as well.
So the problems seem to be getting whittled down I think. This is good news, because this board really has great potential. I did manage to figure out the i2c buses on the 40-pin header (see other forum thread), and I even tested the i2c bus on the 28-pin header last night…and it seems to work correctly as well. I haven’t used any of the 40-pin header’s i2c buses in “production” code just yet, but the i2c bus on the SAMD21 header seems to work correctly using some of the Arduino example code.
TB