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.

Baud rate is faster than normal

We have configure UART1 in a DM365 to run at 115200, and it looks like the frequency is faster than what it supposed to be. We've compared the signal of the terminal vs UART1 and it is faster even though they are both set to 115200 baud rate. Is there a clock setting I need to change to slow it down?

 

Regards,

Javier


  • Hi.

    Did you use 'stty' config?

    # stty -F /dev/ttyS1 115200

    Here is my howto:

    http://e2e.ti.com/support/embedded/f/354/p/141041/508664.aspx

  • Thanks, but I don't have serial.h in the folder "arch/arm/mach-davinci/include/mach/serial.h" I only have "arch/arm/mach-davinci" and there is no serial. file

  • Hmmm..... I can not believe that there is no 'serial.h'. How strange it is!

    I use DVSDK4.02.

     

    DVSDK 4.02 uses PSP 3.01.01.39

    Look here http://arago-project.org/git/projects/linux-davinci.git?p=projects/linux-davinci.git;a=commit;h=161e942bbb6e3603bccd1548865cfcce0910f1cc

    commit=161e942bbb6e3603bccd1548865cfcce0910f1cc

    You can download entire Linux, if click  "snapshot" (Need to wait 2 minutes response from the server (it packs archive). Tarball file to download is approximately 80Mb)

    You can browse files, if click "tree"

    Here is  --->>>  "arch/arm/mach-davinci/include/mach/"

    Here is --->>> "serial.h"

     

  • Ok, I got it working. I have a file called arch/arm/mach-davinci/board-dm365-evm.c. In there I changed the .uartclk = 24000000, to .uartclk = 121500000,

    static struct plat_serial8250_port serial_platform_data[] = {

                    {

                                    .membase = (char *) IO_ADDRESS(DAVINCI_UART0_BASE),

                                    .mapbase = (unsigned long) DAVINCI_UART0_BASE,

                                    .irq = IRQ_UARTINT0,

                                    .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,

                                    .iotype = UPIO_MEM,

                                    .regshift = 2,

                                    .uartclk = 24000000,

                    },

                    {

                                    .membase = (char *) IO_ADDRESS(DM365_UART1_BASE),

                                    .mapbase = (unsigned long) DM365_UART1_BASE,

                                    .irq = IRQ_UARTINT1,

                                    .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,

                                    .iotype = UPIO_MEM,

                                    .regshift = 2,

                                    .uartclk = 121500000,

                    },

                    {

                                    .flags = 0

                    },

    };

     

    Thanks for your help, you actually made me look in this direction with your initial comment.

  • Looks like not Linux 2.6.32 


    :-)

    I can't see 'struct plat_serial8250' in my 'board-dm365-evm.c'.