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.

  • TI Thinks Resolved

AM57x GP EVM UART boot

Intellectual 335 points

Replies: 9

Views: 2462

I have a Am5726 evm and wish to check the boot via uart for our own custom designed board. I have changed the jumpers J3,J4 and J6 to select the UART boot mode. I have written a perl script based on the serial-boot.pl to dump the raw data and look for the ASCI-ID sequence. I also have added a loop that fetches the ASIC-ID 3 times using the boot message 0xf003003 to verify that I have the communications working ok. After sending the u-boot-spl.bin file from u-boot-2015.07+gitAUTOINC+5922e09363/spl I get no response on the serial port so the download of u-boot over y-modem (minicom) does not start. I configured u-boot using 'make am57xx_evm_defconfig' and it built ok. Is there something I am missing?

  • Hi,

    Have a look at this thread:

     

    Uart boot is discussed in details there.

    You probably experience the following problem: "the PMIC cuts off the power, if during a specified time (~10-15 seconds) an image does NOT take over & set the PMIC to continue powering the board. Therefore if you don't have any image loaded in the DDR & executed by ROM code during that time the power will be cut off (power led  on the board stops glowing, which indicates when power is turned off). "

    Workaround for AM5728 GP EVM IS:

     " To overcome this "limitation" populate J5 (or stuff a wire/paper clip/staple into it) on newer boards, or swap R23 with R28 on older boards. "

    Best Regards,

    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    I have just checked and the power led stays on - so I don't think that is the problem.

    Is there any more information about what happens when the ROM transfers control to the loaded image? I have ordered a JTAG debugger to help but in the meantime I added a bit of code to send a byte to the UART3 to see if the code was being executed but got no response.
  • In reply to Roger McCalman51:

    Roger,

    All my experience booting AM572x GP EVM through UART is summarized in the e2e thread I provided in my previous post.  

    When you finish the binary transfer of the u-boot-spl.bin do you start getting CCCC in your debug terminal? Have you added #define CONFIG_SPL_YMODEM_SUPPORT in beagle_x15.h to enable the xmodem support in spl & u-boot?

    Best Regards, 
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Thanks.

    Adding

    Index: include/configs/am57xx_evm.h
    ===================================================================
    --- include/configs/am57xx_evm.h (revision 21730)
    +++ include/configs/am57xx_evm.h (working copy)
    @@ -19,6 +19,7 @@
    #endif

    #define CONFIG_BOARD_EARLY_INIT_F
    +#define CONFIG_SPL_YMODEM_SUPPORT 1

    #define CONFIG_NR_DRAM_BANKS 2


    fixed it.
  • In reply to Roger McCalman51:

    Hi Roger & Yordan,

                 We are trying to boot the AM572x_GP_EVM using uart peripheral mode. we are not able to get the serial-boot.pl file , can you please share this file with us. In our case always getting "!VA" message on the processor debug port. 

    1) How you are sending "u-boot-spl.bin" from HOST machine to Board? (also please share me serial port settings).

    2) How to send "u-boot.img"  file ?

    Regards

    Kishore Kumar

  • In reply to kishore akkala:

    Hi,

    Here is the perl script:
    processors.wiki.ti.com/.../File:Serial-boot.zip

    1. you use the perl script to send the u-boot-spl.bin
    2. Once the spl is loaded to your board, you should immediately open a serial console, i.e. minicom or teraterm & you will see CCCCCC on it.
    3. Use minicom (Ctrl+A -> S) or teraterm or whatever terminal program you use to send u-boot.img via xmodem.

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Thank you Yordan.

    Now it working in windows. But in Linux it is giving error saying "Unable to find required Perl module Device::SerialPort"

    is any package I have to install in u-buntu PC?

    Regards
    Kishore Kumar A
  • In reply to kishore akkala:

    Yes, if you open the script itself and study how it works, you'll see that this is the first thing noted:
    # INSTALLATION NOTES:
    # -------------------
    # WIN32:
    # This package depends on Win32::SerialPort if using windows
    # Download from www.bribes.org/.../
    # PPD file and tgz to c:\perl, open a cmd and cd c:\perl
    # run ppm install Win32-SerialPort.ppd
    #
    # Linux/Other OS:
    # This package depends on Device::SerialPort if using any other OS.
    # Download this using cpan -> cpan install Device::SerialPort
    #
    # The perl script by itself requires only r/w permission to serial port

    Best Regards,
    Yordan

     


     Please make sure you read the forum guidelines first.

  • In reply to Yordan Kovachev:

    Hi,

    I used the perl script as an example and re-wrote it to not use Device::SerialPort as I only needed it to work on Linux and I prefer to install only packages from yum as it makes maintenance simpler.

    The setup of the serial port is
    #!/usr/bin/perl
    #
    use strict;
    use warnings;
    use POSIX qw(:termios_h);
    my ($term, $oterm, $echo, $noecho, $fd_stdin);

    my $fh;
    open($fh, "+<", "/dev/ttyUSB0") || die "failed to open tty - $!";

    $fd_stdin = fileno($fh);
    $term = POSIX::Termios->new();
    $term->getattr($fd_stdin);
    $oterm = $term->getlflag();

    $echo = ECHO | ECHOK | ICANON;
    $noecho = $oterm & ~$echo;

    $term->setlflag($noecho); # ok, so i don't want echo either

    my $cflag = $term->getcflag();
    my $ocflag = $cflag;
    $cflag &= ~PARODD;
    $cflag |= PARENB;
    printf("clfag 0x%08x->0x%08x\n", $ocflag, $cflag);
    $term->setcflag($cflag);
    $term->setcc(VTIME, 0);
    $term->setcc(VMIN, 0);
    $term->setattr($fd_stdin, TCSANOW);
    ...

    I also modified the SPL to allow loading u-boot from tftp rather than via x-modem. The perl code is not pretty and I'm not sure if I can release it for general use.

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.