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.

U-Boot SPL Stuck

Other Parts Discussed in Thread: AM3359, AM3358

Hi TI Community,

I'm facing a boot sutck at the 2st (MLO) stage as it folows:

U-Boot SPL 2011.09-00053-g967afe4 (Aug 16 2012 - 15:34:46)
Texas Instruments Revision detection unimplemented
Incorrect magic number in EEPROM
read_eeprom() failure. continuing with ddr3
Incorrect magic number in EEPROM

I'm working with a clone of the beaglebone (same layout and devices) and according to my readings, even with an empty eeprom this should get at least to the 3rd boot stage which refers to the u-boot.img that should be moved into the DDR2 memory.

My bet is DDR's bad assembling. How can I check if DDR are correctly assembled? I mean is there any way to check this by software through jtag or uboot?

Thanks in advance

  • Hi Victor,

    Looking at the s_init() function inside <u-boot_dir>/board/ti/am335x/board.c I can only assume you are hanging here:

            if (header.magic != 0xEE3355AA) {
                printf("Incorrect magic number (0x%x) in EEPROM\n",
                        header.magic);
                hang();
            }

    If you don't have EEPROM in your custom board, then you can either hardcode these values according to your setup, or remove this logic from the source code.

    If you have an EEPROM, the you can follow this guide to program it:

    http://processors.wiki.ti.com/index.php/AM335x_Starter_Kit_ID_Memory_Programming

    Best regards,
    Miroslav

  • Hi Miroslav,

    Thanks for your reply.

    I do have an EEPROM which is empty (since the board was assembled here).

    I've tried to follow the steps on the link you said (the only diference is that we are powering the board through USB) but nothing happens: Neither that diagnostic menu nor that "CCC" print.

    Again, would this diagnostic app run if the external memory (RAM) was not assembled properly?

    I'm gonna try hardcoding just to make sure u-boot.img can be loaded.

    Thank you very much

    Victor Leite

  • VICTOR LEITE said:
    Again, would this diagnostic app run if the external memory (RAM) was not assembled properly?

    The bootloader binary will initialize the DDR before running the diagnostic app, so if there is something wrong with the DDR, the diagnostic app shouldn't run. For more information check the "bootloader" example from the StarterWare package. The source code is freely available.

    VICTOR LEITE said:
    I've tried to follow the steps on the link you said (the only diference is that we are powering the board through USB) but nothing happens: Neither that diagnostic menu nor that "CCC" print.

    Which "MLO" binary are you using? The correct MLO binary (bootloader) for the BeagleBone can be found inside <StarterWare_dir>/binary/armv7a/cgt_ccs/am335x/beaglebone/bootloader.

    Best regards,
    Miroslav

  • Hi Miroslav,

    This starterware app shows me there is something wrong with my hardware.

    I tried the same app with another beaglebone with an empty eeprom and it works just fine!

    Thank you very much for your replies.

    Best regards,

    Victor Leite

  • Hi,

    We have assembled a few beaglebone-clone boards but it seems that something is really going wrong with our boards. Please see the output of the starterware app which runs great with any original beaglebone but with our board is getting stuck at this point:

    StarterWare AM335x Boot Loader
    Copying application image from MMC/SD card to RAM
    Jumping to StarterWare Application...

    I suppose it has to do with DDR memory (I'm checking schematics, memory device version, etc)

    Now I'm trying to find out what is happening. One of the ways I'm trying it is to check registers through JTAG debugger.

    If anybody has any sort of idea, suggestion, advice, please help!

    Thanks

  • Hi,

    The "StarterWare AM335x Boot Loader" is the MLO written for 256MB DDR3 on TI starter KIT. It didnt work for me in beaglebobe either. After you build u-boot make sure you copy both MLO and U-boot.img. I did the same this to hack beaglebone and I missed to copy MLO. Then I realized MLO does clk_init, PLL_Init, peripheral_init, DDR3_init. If you dont have luck with it, hook-up the emulator(XDS) and try to load the gel script. That  way you can isolate if you have any DDR3 problem. 

     

    Thanks

    siva.

  • Hi Siva,

    Thank you very much for your reply!

    1) The boot loader and app I'm using are located inside beaglebone folder at the Starterware directory. The same files (actually the same sdcard) are running OK with the original beaglebones which were supposed to be identical.

    2) Im trying to get more information through CCS 5.5 and JTAG XDS100v2 emulator. I'm using the Beaglebone.ccxml (target config file) which comes with CCS and the AM335x_beaglebone.gel file from the starterware directory.

    Again, I can load some apps to the original beaglebone memory but when I try the exacly same steps with my "clone" I get the following:

    CortxA8: Breakpoint Manager: Retrying with a AET breakpoint
    CortxA8: Trouble Setting Breakpoint with the Action "Finish Auto Run" at 0x80030d70: (Error -1066 @ 0x333C) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 5.1.232.0) 
    

  • Hi Victor,

    For some reason I couldnt connect the XDS100V2 on my beaglebone and also on my custom board. So I bought FT2232H eval board from Digikey and used it as TI emulator. 

    http://www.digikey.com/product-search/en?WT.z_header=search_go&lang=en&site=us&keywords=768-1030-ND&x=0&y=0&formaction=on

    I got this and modified the PID/VID to work as TI emulator. Please see the link below.

    http://processors.wiki.ti.com/index.php/XDS100#Q:_How_can_I_check_if_the_VID.2FPID_for_the_EEPROM_are_programmed_correctly.3F

    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/226953.aspx

    I know this is going in different direction. But this is what I did to make the FT2232 based emulator working for beaglebone. 

    If you proceed with FT2232H, let me know for further questions any.

    Thanks

    siva.

  • Hi Siva,

    I have programmed the FT2232H ports using the Mprog 3.5 - EEPROM Programming Utility provided by FTDI:

    http://www.ftdichip.com/Support/Utilities.htm#MProg

    I works fine. I also have reprogrammed a FT2232H of an original beaglebone and everything works great! I can connect to it, debug apps, see the processor registers and the memory browser.

    Unfortunately, with my clone I just have access to the processor registers but not the memory (related to the external one) nor debug apps (as you can see on the above reply).

    The attached text is the output of the JTAG connection test.

    Thank you

    Victor Leite

  • I posted another topic since this issue is getting very specific:

    Troubleshooting DDR memory

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/318808.aspx

    Thanks

  • After you connect to the target, did you run DDR_DataTransferCheck script? Does it read your DDR?

  • Could you please provide any documentation, link, or just comments about the steps to run this script?

    Thank you very much!

  • Hi Victor,

    Download the gel script and load it. This link gives you detail step by step procedure. 

    http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Tuning_the_DDR3_Timings_on_BeagleBoneBlack

    After you do "connect target", in css -> "scripts tab" you can see ddr-datatransfer option. If you run that, it will do R/W on DDR for 250 locations. If you want to check all locations in gel script, at line 900, you can edit those parameters. 

    Thanks

    siva.

  • Hi Siva,

    DDR_DataTransferCheck failed!

    I've checked the timings from the wiki you posted. (I'm using the DDR2 spreadsheet provided from TI since I'm not working with the beaglebone black but the white one) 

    I'm trying to probe the DDR clock output from the AM3359. I'm not sure what I'm doing wrong but I couldn't get this signal. Do you have experience with that kind of probing?

    Thank you very much for your replies.

    Victor Leite

  • Hi Victor,

    Thats very weird. You should see all the adress lines, clock  toggle when you run that gel script. It configures the mode set registers in DDR. It doesnt matter DDR responds. even if you take DDR, you should see the clock and address bit toggle on BGA pads. 

    Have a x-ray to make sure your am335x soldered properly. 

    Thanks

    siva.

  • Siva,

    I didn't realize the DDR clock would be running just when some sort of communication with memory take place. My bad! 'm gonna try to probing clock again but this time running the DDR_DataTransferCheck script.

    I don't have a x-ray available here. Maybe I'll try submit a few boards to a third-party.

    One more thing, I'm not sure if I was clear enough before: GEL EMIF, DDR PHY Configs are OK! Just the DDR_DataTransfer script fails.

    Thanks

     

  • Hi Victor,

    EMIF, PHY configuration is one directional. Even if you dont populate the DDR the configuration will be successful.

    And the clock wont be running all the time until you access the DDR. Easier way is to modify the gel script ddr_datatransfer function. Increase the number of locations to be checked to 10000 or something, or do this,..

    hotmenu AM3358_SK_Initialization()
    {

    unsigned int i,j;

    GEL_TextOut("**** AM3358_SK Initialization is in progress .......... \n","Output",1,1,1);
    ARM_OPP100_Config();

    for(i=0;i<100000;i++)

    {

    for(j=0;j<100000;j++); //some delay
    DDR3_EMIF_Config();

    }
    GEL_TextOut("**** AM3358_SK Initialization is Done ****************** \n\n\n","Output",1,1,1);
    }

    thanks

    siva.

  • Siva,

    The ddr_ck from processor can't be seen at the trace it was supposed to be.
    That was confirmed by a measuring today (It was compared with an original board with the same steps)

    Now I'm gonna send a few boards to a X-ray inspection in order to know if there is something wrong with our assembling and which pads are not properly connected.

    Thanks

  • Victor,

    All the best with x-ray. Make sure your PLL supplies are fine. If you dont see ddr clk in few more boards, I would think its not solder issue. If you have clkout, probe that to make sure your clock is propagating.

    Have a look at this, if you didnt to make sure all supplies are fine. 

    http://processors.wiki.ti.com/index.php/AM335x_board_bringup_tips

    thanks

    siva.