This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RS485 communication not working baud rate below 4800

I am using am335x based customized board and using RS485 , but Rs-485 communication is not working if the baud rate is below 4800.

  • Please post the Linux version you are using.

  • i am using linux 3.2 kernel, above 4800 baud rate everything is working fine

  • Hi,

    Which baud rates are you trying to use?

    Have in mind that linux calculates the uart divisor using the following function:
    serial_omap_get_divisor(struct uart_port *port, unsigned int baud)
    {
        unsigned int divisor;

        if (baud > OMAP_MODE13X_SPEED && baud != 3000000)
            divisor = 13;
        else
            divisor = 16;
        return port->uartclk/(baud * divisor);
    }

    Where uartclk is defined in arch/arm/mach-omap2/serial.c:
    omap_up.uartclk = OMAP24XX_BASE_BAUD * 16;

    And OMAP24XX_BASE_BAUD & OMAP_MODE13x_SPEED are defined in arch/arm/plat-omap/include/plat/omap-serial.h:
    #define OMAP_MODE13X_SPEED 230400
    & arch/arm/plat-omap/include/plat/serial.h:
    #define OMAP24XX_BASE_BAUD (48000000/16)

    Setup this way omap serial driver supports ONLY the baud rates listed in Table 19-6. UART Mode Baud and Error Rates of AM335x TRM.

    Best Regards,
    Yordan