[En-Nut-Discussion] USART feature intresting?

Ulrich Prinz uprinz2 at netscape.net
Tue Apr 7 18:15:23 CEST 2009


Hi! 
 
I had to modify usart*at91.c and related files to add a simple feature to 
the usart.  
Single-Wire transfer without hardware direction switching.  
So it is comparable to the software half duplex mode but without switching 
any hardware port for lets say RS485 direction control. 
 
To establish this and to get out of trouble with dozens of #ifdefs I 
introduced a new mode via ioctl that enbales software controlled half 
duplex. This patch is independant of the RS485 pin toggle. It enables 
single-wire RS232 ( TX is merged to RX with a open drain FET and a pullup) 
including echo-cancellation for nearly no cost of code. Only the 
TX-Complete interrupt is needed after transmission of the last byte. An 
intresting option is to use RS485 tranceiver without spending a GPIO for 
DE/RE switching and without reading own messages back. 
 
If intresting I can deliver this patch after some more testing. 
 
Best regards, Ulrich



More information about the En-Nut-Discussion mailing list