[En-Nut-Discussion] Loosing characters on debug interface (uart) using printf

Przemyslaw Rudy prudy at audiotech.pl
Mon Jun 7 15:40:35 CEST 2004


Hi,
I observed the same using 115200bps and a HyperTerminal to receive those 
printouts. But when I was pressing Enter simultaneously on HT then the 
whole strings were received. If I’m not wrong I had no problem using 
TeraTermPro instead. Also no problems with any terminal under linux.

Regards,
Przemek

P.S.
I found something strange using usart recently. When I print/read over 
usart sometimes the read looses input data. I have to call nut_sleep(1) 
between two successive reads. I’m using usart0 and usart1 in 485 mode 
(didn’t check if is the same with uart driver). I didn’t dig much into 
it so I cannot say if it’s a diver blocking problem or it’s me.




Ole Reinhardt wrote:

> Hi,
> 
> I noticed a strange behavior of Nut/Os when I'm using printf.
> 
> I first register devDebug0 and assign it as stdout:
> 
> NutRegisterDevice(&devDebug0, 0, 0);
> freopen("uart0", "w", stdout);
> _ioctl(_fileno(stdout), UART_SETSPEED, &baud);
> 
> When I now use printf the output is written to uart0. But I often loose
> characters or even whole strings. Especially while producing high output
> traffic.
> 
> Is this a known problem or normal behavior? Any fixes or workarounds?
> 
> Regards,
> 
> Ole Reinhardt
> 



More information about the En-Nut-Discussion mailing list