Closed the-maldridge closed 1 year ago
I can very easily check this with a logic analyzer on GP4 to see what's being output electrically. Maybe the small baudrate is a problem because it can't find a right clock divider or delay number of for it? Did you test with another one like 9600?
The problem occurs with all baud rates I have yet tried. My preference of course would be to run at 9600 or higher, but when I encountered problems, I started clocking downwards to see if this was a speed related issue.
I suggest you check your UART for proper configuration. Default is 8N1, and with your example at 300bps I get a nice, decoded A\r\n
using my logic analyzer. Same at other baud rates:
I can confirm the same results, compiling and uploading your sketch and feeding the GP4 signal to the RX of a USB-UART adapter (with the same common GND) gives the expected results at 300 baud.
This may mean that your hardware or hardware connections are faulty instead.
I'm troubleshooting a problem with using Serial2/UART1 to provide an extra serial port in a design. When using the following test program, I get garbage in my console that appears to be the right number of bytes. At this point I'm inclined to think that there's something wrong in the underlying code that drives Serial2, so I'm looking for any help in figuring out what went wrong here.