2010-09-03 15:49:48     using BF537 uart for 31250 baud

Document created by Aaronwu Employee on Aug 22, 2013
Version 1Show Document
  • View in full screen mode

2010-09-03 15:49:48     using BF537 uart for 31250 baud

Adam Rosenberg (UNITED STATES)

Message: 93119   

 

There does not seem to be a setting in termios.h for 31250 baud.  I see in linux-2.6.x/drivers/serial/bfin_5xx.c there are the following lines of code to set the uart clock divisor.  Should I modify this code here or is there another way for me to gain access to this baud rate for MIDI?

 

 

 

    baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);

    quot = uart_get_divisor(port, baud);

 

    /* If discipline is not IRDA, apply ANOMALY_05000230 */

    if (termios->c_line != N_IRDA)

        quot -= ANOMALY_05000230;

 

    UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15);

 

    /* Disable UART */

    ier = UART_GET_IER(uart);

    UART_DISABLE_INTS(uart);

 

    /* Set DLAB in LCR to Access DLL and DLH */

    UART_SET_DLAB(uart);

 

    UART_PUT_DLL(uart, quot & 0xFF);

    UART_PUT_DLH(uart, (quot >> 8) & 0xFF);

    SSYNC();

 

 

 

Thanks,

Adam

QuoteReplyEditDelete

 

 

2010-09-03 15:54:18     Re: using BF537 uart for 31250 baud

Mike Frysinger (UNITED STATES)

Message: 93120   

 

please read the FAQ:

https://docs.blackfin.uclinux.org/doku.php?id=faq

QuoteReplyEditDelete

 

 

2010-09-03 15:58:47     Re: using BF537 uart for 31250 baud

Adam Rosenberg (UNITED STATES)

Message: 93121    Excellent, thanks again!

 

Adam

Attachments

    Outcomes