I.mx6 Quad how to set uboot Baud rate

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I.mx6 Quad how to set uboot Baud rate

Jump to solution
3,409 Views
fatalfeel
Contributor V

I set the command line bootargs

the kernel I set 460800 works fine

console=ttymxc0,460800

but uboot is failed can not work at 460800

Which File need change or what command need change

by the way bootable\bootloader\uboot-imx\drivers\serial\serial.c

CONFIG_SYS_BAUDRATE_TABLE


which file define this?

Labels (3)
1 Solution
2,235 Views
fatalfeel
Contributor V

great info

i use openocd eclipse and set ur command

trace to /bootloader/uboot-imx/include/config_fallbacks.h

this file define it~

#define CONFIG_BAUDRATE 115200

#define CONFIG_SYS_BAUDRATE_TABLE  \

{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}

Programming Guide: BaudRate setting for u-boot and kernel on i.mx6

View solution in original post

0 Kudos
5 Replies
2,237 Views
fatalfeel
Contributor V

static void mxc_serial_setbrg(void)

{

    u32 clk = imx_get_uartclk();

    //if (!gd->baudrate) //by stone   need mark here

    printf("old baudrate=%d, new baudrate=%d \n", gd->baudrate, CONFIG_BAUDRATE);

    gd->baudrate = CONFIG_BAUDRATE;

    __REG(UART_PHYS + UFCR) = 4 << 7; /* divide input clock by 2 */

    __REG(UART_PHYS + UBIR) = 0xf;

    __REG(UART_PHYS + UBMR) = clk / (2 * gd->baudrate);

}

0 Kudos
2,237 Views
fabio_estevam
NXP Employee
NXP Employee

You can send this command in U-boot prompt:

setenv baudrate 460800

Regards,

Fabio Estevam

2,236 Views
fatalfeel
Contributor V

great info

i use openocd eclipse and set ur command

trace to /bootloader/uboot-imx/include/config_fallbacks.h

this file define it~

#define CONFIG_BAUDRATE 115200

#define CONFIG_SYS_BAUDRATE_TABLE  \

{300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}

Programming Guide: BaudRate setting for u-boot and kernel on i.mx6

0 Kudos
2,237 Views
igorpadykov
NXP Employee
NXP Employee

Hi jesse

baudrate is set in uboot board configuration file like:

include/configs/mx6sabre_common.h   #define CONFIG_BAUDRATE 115200

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,237 Views
fatalfeel
Contributor V

But i want this define~~~
CONFIG_SYS_BAUDRATE_TABLE

0 Kudos