AnsweredAssumed Answered

about the issue that the UART baudrate is too low when booting by uart

Question asked by aqbhc on Nov 7, 2013
Latest reply on Nov 13, 2013 by Prashant

Hi all,

 

The issue is a very urgent problem for us now, if the UART baudrate can't meet us requirement, we have to change our hardware board, it's a hard work.

Let me summary the question.

We want download the blackfin dsp firmware from MCU to blackfin524 through UART, so I do some testing for download the dsp firmware,I find I can download firmware by baudrate :2400,4800,9600,19200,38400,57600;

If the baudrate is higher than 57600bps, I can't get the right ACK from blackkfin524;

 

It seems that the auto-baudrate works, but the boot rom of blackfin524 cant support higher uart baudrate when booting from UART;

 

So my questions are:

  1.   Whether can blackfin524 support higher uart baudrate when booting from UART?
  2.   How can I use higher baudrate to download dsp firmware?

 

 

 

My testings are as followings:

 

I use the following uart baudrate:

static int speed_arr[] =

{

    4000000, 3500000, 3000000, 2000000, 1500000, 1152000,

    921600, 460800,  230400,  115200,  57600,  38400,

    19200, 9600,    4800,    2400, 1800,   1200,

600,     300, 150,     110, 75,     50

};

 

  1. 1.

I use the 4800 baudrate to download dsp firmware to blackfin524, it’s ok;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 4800

Start testing ua[  357.867675] omap-serial.c the real baud is:4800, the quot:625

rt device name:/[  357.874759] omap-serial.c the up->dll is:113, up->dlh:2

dev/ttyO1,baudrate:4800,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xbf

fwdownload::reading ack from dsp, i:1,ack:0x68

fwdownload::reading ack from dsp, i:2,ack:0x1

fwdownload::reading ack from dsp, i:3,ack:0x0

fwdownload::Error ack:0xbf,0x68,0x1,0x0,err:1

fwdownload::start to open firmware file

fwdownload::start to send firmware to dsp

fwdownload::write firmware to dsp 2048 bytes,i:0

fwdownload::write firmware to dsp 2048 bytes,i:1

fwdownload::write firmware to dsp 2048 bytes,i:2

fwdownload::write firmware to dsp 2048 bytes,i:3

fwdownload::write firmware to dsp 2048 bytes,i:4

fwdownload::write firmware to dsp 2048 bytes,i:5

fwdownload::write firmware to dsp 2048 bytes,i:6

fwdownload::write firmware to dsp 2048 bytes,i:7

fwdownload::write firmware to dsp 2048 bytes,i:8

fwdownload::write firmware to dsp 2048 bytes,i:9

fwdownload::write firmware to dsp 772 bytes,i:10

 

  1. 2.

I use the 9600 baudrate to download dsp firmware to blackfin524, it’s ok;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 9600

Start testing uart device name:/dev/ttyO1,baudrate:9600,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xbf

fwdownload::reading ack from dsp, i:1,ack:0xb3

fwdownload::reading ack from dsp, i:2,ack:0x0

fwdownload::reading ack from dsp, i:3,ack:0x0

fwdownload::Read ack:0xbf,0xb3,0x0,0x0,err:1

fwdownload::start to open firmware file

fwdownload::start to send firmware to dsp

fwdownload::write firmware to dsp 2048 bytes,i:0

fwdownload::write firmware to dsp 2048 bytes,i:1

fwdownload::write firmware to dsp 2048 bytes,i:2

fwdownload::write firmware to dsp 2048 bytes,i:3

fwdownload::write firmware to dsp 2048 bytes,i:4

fwdownload::write firmware to dsp 2048 bytes,i:5

fwdownload::write firmware to dsp 2048 bytes,i:6

fwdownload::write firmware to dsp 2048 bytes,i:7

fwdownload::write firmware to dsp 2048 bytes,i:8

fwdownload::write firmware to dsp 2048 bytes,i:9

fwdownload::write firmware to dsp 772 bytes,i:10

 

  1. 3.

I use the 19200 baudrate to download dsp firmware to blackfin524, it’s ok;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 19200

Start testing ua[ 1203.657621] omap-serial.c the real baud is:19200, the quot:156

rt device name:/[ 1203.664955] omap-serial.c the up->dll is:156, up->dlh:0

dev/ttyO1,baudrate:19200,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xbf

fwdownload::reading ack from dsp, i:1,ack:0x59

fwdownload::reading ack from dsp, i:2,ack:0x0

fwdownload::reading ack from dsp, i:3,ack:0x0

fwdownload::Error ack:0xbf,0x59,0x0,0x0,err:1

fwdownload::start to open firmware file

fwdownload::start to send firmware to dsp

fwdownload::write firmware to dsp 2048 bytes,i:0

fwdownload::write firmware to dsp 2048 bytes,i:1

fwdownload::write firmware to dsp 2048 bytes,i:2

fwdownload::write firmware to dsp 2048 bytes,i:3

fwdownload::write firmware to dsp 2048 bytes,i:4

fwdownload::write firmware to dsp 2048 bytes,i:5

fwdownload::write firmware to dsp 2048 bytes,i:6

fwdownload::write firmware to dsp 2048 bytes,i:7

fwdownload::write firmware to dsp 2048 bytes,i:8

fwdownload::write firmware to dsp 2048 bytes,i:9

fwdownload::write firmware to dsp 772 bytes,i:10

 

  1. 4.

I use the 38400 baudrate to download dsp firmware to blackfin524, it’s ok;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 38400

Start testing ua[ 1287.877726] omap-serial.c the real baud is:38400, the quot:78

rt device name:/[ 1287.884982] omap-serial.c the up->dll is:78, up->dlh:0

dev/ttyO1,baudrate:38400,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xbf

fwdownload::reading ack from dsp, i:1,ack:0x2c

fwdownload::reading ack from dsp, i:2,ack:0x0

fwdownload::reading ack from dsp, i:3,ack:0x0

fwdownload::Error ack:0xbf,0x2c,0x0,0x0,err:1

fwdownload::start to open firmware file

fwdownload::start to send firmware to dsp

fwdownload::write firmware to dsp 2048 bytes,i:0

fwdownload::write firmware to dsp 2048 bytes,i:1

fwdownload::write firmware to dsp 2048 bytes,i:2

fwdownload::write firmware to dsp 2048 bytes,i:3

fwdownload::write firmware to dsp 2048 bytes,i:4

fwdownload::write firmware to dsp 2048 bytes,i:5

fwdownload::write firmware to dsp 2048 bytes,i:6

fwdownload::write firmware to dsp 2048 bytes,i:7

fwdownload::write firmware to dsp 2048 bytes,i:8

fwdownload::write firmware to dsp 2048 bytes,i:9

fwdownload::write firmware to dsp 772 bytes,i:10

 

  1. 5.

I use the 57600 baudrate to download dsp firmware to blackfin524, it’s ok;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 57600

Start testing ua[  677.017610] omap-serial.c the real baud is:57600, the quot:52

rt device name:/[  677.024859] omap-serial.c the up->dll is:52, up->dlh:0

dev/ttyO1,baudrate:57600,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xbf

fwdownload::reading ack from dsp, i:1,ack:0x1d

fwdownload::reading ack from dsp, i:2,ack:0x0

fwdownload::reading ack from dsp, i:3,ack:0x0

fwdownload::Error ack:0xbf,0x1d,0x0,0x0,err:1

fwdownload::start to open firmware file

fwdownload::start to send firmware to dsp

fwdownload::write firmware to dsp 2048 bytes,i:0

fwdownload::write firmware to dsp 2048 bytes,i:1

fwdownload::write firmware to dsp 2048 bytes,i:2

fwdownload::write firmware to dsp 2048 bytes,i:3

fwdownload::write firmware to dsp 2048 bytes,i:4

fwdownload::write firmware to dsp 2048 bytes,i:5

fwdownload::write firmware to dsp 2048 bytes,i:6

fwdownload::write firmware to dsp 2048 bytes,i:7

fwdownload::write firmware to dsp 2048 bytes,i:8

fwdownload::write firmware to dsp 2048 bytes,i:9

fwdownload::write firmware to dsp 772 bytes,i:10

fwdownload::Error read firmware file: Success

 

 

  1. 6.

I use the 115200 baudrate to download dsp firmware to blackfin524, it’s failed because I can’t get the right ACK;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 115200

Start testing ua[  149.207625] omap-serial.c the real baud is:115200, the quot:26

rt device name:/[  149.214971] omap-serial.c the up->dll is:26, up->dlh:0

dev/ttyO1,baudrate:115200,databits:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0xdf

fwdownload::reading ack from dsp, i:1,ack:0x8

fwdownload::reading ack from dsp, i:2,ack:0x80

 

 

  1. 7.

I use the 921600 baudrate to download dsp firmware to blackfin524, it’s failed because I can’t get the right ACK;

 

root@am335x-evm:/media/card# ./uarttool -f 1 -b 921600

Start testing ua[  114.961022] omap-serial.c the real baud is:9600, the quot:312

rt device name:/[  114.968192] omap-serial.c the up->dll is:56, up->dlh:1

dev/ttyO1,baudra[ 114.975866] omap-serial.c the real baud is:921600, the quot:4

te:921600,databi[ 114.982466] omap-serial.c the up->dll is:4, up->dlh:0

ts:8,parity:N,stopbits:1,hwflow:1.

fwdownload::start to send boot cmd to dsp

fwdownload::reading ack from dsp, i:0,ack:0x3f

fwdownload::reading ack from dsp, i:1,ack:0x10

Outcomes