UART Configuration

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

UART Configuration

1,532 Views
deepanrajanbara
Contributor IV

Hi,

Ours is a custom board based on imx6 SBC.we are to configure the UART3(not debug UART) with 4Mbps speed .Can Anyone please tell where to set the UART speed in u-boot and Linux Kernel.

Thankyou,

Deepanraj.A

Labels (2)
0 Kudos
5 Replies

803 Views
deepanrajanbara
Contributor IV

Hi,

I Have tried that but am not able to check its working in minicom or teraterm.which serial terminal is possible to check .

Thankyou

0 Kudos

803 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I would use an scope or a logic analyzer to check the baudrate. I am not sure if those serial terminals support that baudrate.

It might be possible that even the clock source needs to be changed.  But please measure that before and let us know.

Best Regards,

Alejandro

0 Kudos

803 Views
igorpadykov
NXP Employee
NXP Employee

Hi Deepanraj

you can add debug printf to function serial_setbrg() in

uboot/drivers/serial/serial_mxc.c

to check what exact baudrate is set to UART:

void serial_setbrg (void)

{

    u32 clk = mxc_get_clock(MXC_UART_CLK);

    if (!gd->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);

}

Best regards

chip

0 Kudos

803 Views
saurabh206
Senior Contributor III

Hi,

Deep

Use oscilloscope and check signals on pins.

Saurabh

0 Kudos

803 Views
igorpadykov
NXP Employee
NXP Employee

Hi Deepanraj

in Uboot you can try to set in uboot/include/configs/mx6q_sabresd.h

#define CONFIG_BAUDRATE   4000000

and check

Best regards

chip

0 Kudos