I am writing an RS485 driver for an ARM AT91SAM9260 board on Linux.
When I initialize the UART, the RTS signal line becomes high (1). I assume that this will and should be standard behavior in RS232 mode. However, in RS485 mode this is not required.
I use the standard functions provided by the arm-arch section to initialize UART. Therefore, the important steps are:
at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); //consisting of: // >> configure/mux the pins at91_set_A_periph(AT91_PIN_PB10, 1); /* TXD */ at91_set_A_periph(AT91_PIN_PB11, 0); /* RXD */ if (pins & ATMEL_UART_RTS) at91_set_B_periph(AT91_PIN_PC8, 0); /* RTS */ if (pins & ATMEL_UART_CTS) at91_set_B_periph(AT91_PIN_PC10, 0); /* CTS */ // >> associate the clock axm_clock_associate("usart3_clk", &pdev->dev, "usart"); // >> et voilΓ
As you can see with
at91_set_B_periph (AT91_PIN_PC8,0);
pull-up on the RTS pin is not activated.
source share