[En-Nut-Discussion] Serial Lockup

Harald Kipp harald.kipp at egnite.de
Thu May 8 11:29:41 CEST 2008


Tim DeBaillie wrote:
> Has anyone had any issues with a serial port file descriptor closing due 
> to lots of data at the baud rate being received.
...
> Some things we have considered are changing the fgetc into an fgets or 
> fread.  However it shouldn't matter because the OS serial port interrupt 
> should handle this even if we don't read quick enough right?

Only a vague comment: The AT91 USART drivers may not have been tested 
extensively on the SAM7X, just quickly ported and found working. I'd 
assume a problem in the lowest driver level.

Looking to the higher level: How do you know, that fgetc returns EOF 
because of a closed handle and not because of a USART error? See feof() 
and ferror().

You're assumption about interrupt handling is correct. The application 
doesn't need to be fast.

Harald




More information about the En-Nut-Discussion mailing list