Re: console_getline vs 0ms char delay in UART comms
I wasn’t suspecting your FT232R HW, just how the various terminal programs set up the HW may be different. When all other debugging fails, nothing beats the certainty of capturing the waveforms with an oscilloscope and validating that all of the characters were sent, and the signal levels are good. But you are not likely to this level of debugging yet.
When you are using cutecom, try setting to 8N2. This adds one extra bit time between characters which a lot less than 1mS and may be enough that you stop dropping characters.
What baudrate are you running at? The usual 115200? Do you see the same problem if you try slower speeds like 38400 or 19200? Of course you need to change both ends of the link if you select an alternat baud rate.
Finally, what processor and processor clock rate are you running, you may simply be sending characters faster than your processor can respond to interrupts and receive the characters (which would make sense if you are missing every second character).
From: Piotr Barszczewski <piotr@...>
Sent: Wednesday, March 17, 2021 3:43 PM
To: Lawrence King <lawrence.king@...>; users@...
Subject: RE: [Zephyr-users] console_getline vs 0ms char delay in UART comms
Thank you for your reply. I’m working with 8N1 and the USB-UART is FT232R of which I’m pretty certain that it’s working correctly. It works with other firmware, developed with older Nordics SDK and haven’t experienced issues with it yet. In my experience I’ve narrowed it down to the 0ms delay in Cutecom making the getline console example to loose some characters on hadrware which works ok with different firmware with the same Cutecom settings.
As for hardware design it uses a schematic which has been validated by FTDI support as on a different device we’ve been experiencing different issues so I find it unlikely that it would be at blame here.
When I have a moment I’ll try to replicate it with nrf52832 DK but I expect that it could be better as the DK enumerates as ttyACM port device which I’ve previously found to behave differently than ttyUSB which I wrote down in https://devzone.nordicsemi.com/f/nordic-q-a/62732/zephyr-hci_uart-on-nrf52840-with-ft232r and unfortunately it’s still unsolved by me. Maybe FT232R and Zephyr sometimes don’t really get along for some reason?
On 17 March 2021 at 14:30:35, Lawrence King (lawrence.king@...) wrote: