|
Hi,
I'm writing my own serial RS485 driver on an at91sam9260 running Linux 2.6.32.
Everything works fine except, that I'm not able to keep RTS low after initialisation of the UART. As soon as I mux the RTS-Pin to its UART-RTS role -> it goes high.
[code] /* Disable interrupts */ UART_PUT(vbaseaddr, ATMEL_US_IDR, ATMEL_US_TXEMPTY );
/* Resetting serial mode to RS232 (0x0) */ mode = UART_GET(vbaseaddr,ATMEL_US_MR); mode &= ~ATMEL_US_USMODE; mode |= ATMEL_US_USMODE_RS485;
UART_PUT(vbaseaddr, ATMEL_US_MR, mode);
/* force rts to be low */ /* write control flags */ control = 0; control |= ATMEL_US_RSTTX; /* Reset TX (transceiver) */ control |= ATMEL_US_RTSEN; /* Reset RX (receiver) */ UART_PUT(vbaseaddr, ATMEL_US_CR, control);
control = ATMEL_US_TXEN; /* Enable TX (transceiver) */ UART_PUT(vbaseaddr, ATMEL_US_CR, control); [/code]
What's wrong with that? I thought once I set the RS485 mode, the RTS will be controlled by the UART and only driven, if there is data to transmit.
thanks for your support
|