2010-12-14 05:34:17     Alternate UART Console Query BF527

Document created by Aaronwu Employee on Sep 25, 2013Last modified by Aaronwu Employee on Sep 25, 2013
Version 2Show Document
  • View in full screen mode

2010-12-14 05:34:17     Alternate UART Console Query BF527

Appalayagari Sreedhar (INDIA)

Message: 96704   

 

Hi,

 

I am working with 2008R1 uboot. BF527 custom board.

 

the debug(console) is connected to the PG12 and PG13 which is alternate UART1 transmit and Receive respectively.

 

I need to modify the uboot code for the alternate UART1 console.

 

Can you please suggest where to do the changes in the uboot code so that i can make use of the alternate uart1 tx and rx instead of PF14 and PF15.

 

Thank you, Sreedhar.

QuoteReplyEditDelete

 

 

2010-12-14 07:36:00     Re: Alternate UART Console Query BF527

Appalayagari Sreedhar (INDIA)

Message: 96707   

 

Hi,

 

One correction the uboot version is

 

U-Boot 2008.10 (ADI-2009R1-rc3)

 

Thank you.

QuoteReplyEditDelete

 

 

2010-12-14 10:21:19     Re: Alternate UART Console Query BF527

Mike Frysinger (UNITED STATES)

Message: 96711   

 

versions before 2010R1 do not have any way to control alternate port mappings.  you will need to modify the serial driver yourself or upgrade to 2010R1.

QuoteReplyEditDelete

 

 

2010-12-15 04:02:05     Re: Alternate UART Console Query BF527

Appalayagari Sreedhar (INDIA)

Message: 96760   

 

Hi Mike,

 

Upgrading to the 2010R1 uboot is somewhat unlikely at this stage of the development.

 

we need to use the 2009R1-RC3 uboot only. I have modified the serial.h file in this manner, please suggest whether these changes are ok for my problem.

 

#elif defined(__ADSPBF52x__)

 

# if (CONFIG_UART_ALTERNATE == 0)

# define DO_MUX(port, mux, tx, rx) \

        bfin_write_PORT##port##_MUX((bfin_read_PORT##port##_MUX() & ~PORT_x_MUX_##mux##_MASK) | PORT_x_MUX_##mux##_FUNC_3); \

        bfin_write_PORT##port##_FER(bfin_read_PORT##port##_FER() | P##port##tx | P##port##rx);

 

 

# elif (CONFIG_UART_ALTERNATE == 1)

# define DO_MUX(port, mux, tx, rx) \

        bfin_write_PORT##port##_MUX((bfin_read_PORT##port##_MUX() & ~PORT_x_MUX_##mux##_MASK) | PORT_x_MUX_##mux##_FUNC_2); \

        bfin_write_PORT##port##_FER(bfin_read_PORT##port##_FER() | P##port##tx | P##port##rx);

 

 

#endif

 

        switch (CONFIG_UART_CONSOLE) {

 

 

        # if (CONFIG_UART_ALTERNATE == 0)

        case 0: DO_MUX(G, 2, 7, 8);   break;    /* Port G; mux 2; PG2 and PG8 */

        case 1: DO_MUX(F, 5, 14, 15); break;    /* Port F; mux 5; PF14 and PF15 */

 

 

        # elif (CONFIG_UART_ALTERNATE == 1)

        case 1: DO_MUX(G, 5, 12, 13); break;    /* Port G; mux 5; PG12 and PG13 */

 

 

        #endif

 

 

        }

 

 

        SSYNC();

 

 

 

Many thanks.

 

-Sreedhar.

QuoteReplyEditDelete

 

 

2010-12-15 06:27:02     Re: Alternate UART Console Query BF527

Mike Frysinger (UNITED STATES)

Message: 96765   

 

if you're getting output, then it's probably correct

Attachments

    Outcomes