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.

Re loading U boot to NOR Flash in Davinci EVM DM6446

I am trying to download my sample application code (LED sample code from spectrum digital) to my davinci EVM DM6446 I want to flash this code to NOR flash so that I can run the same code even after i power- reset the board.

So I have followed "Flashing DM644x EVM using NOR Writer utilities (CCS environment)" (http://processors.wiki.ti.com/index.php/UG:_DaVinci_PSP_Installation_on_DM644x_EVM#Building_UBL_for_DM644x_810MHz_EVM_.28CCS_environment.29

) I have used CCS v 5.5.0 and XDS560 v2 LC traveller as emulator 

My log is as below:

Conslole:

[ARM9_0] Starting DM644x_NORWriter.

CFI Query...passed.

NOR Initialization:

      Command Set: Intel

      Manufacturer: INTEL

      Size: 0x10 MB

Does your u-boot version require a UBL in the NOR flash (Y/N)?

Y

Enter the UBL file Name (enter 'none' to skip):

D:\PROJECTS\NOR_WR\UBL_DM6446_NOR.bin

Erasing the NOR Flash

Erased through 0x2020000

Erase Completed

Writing the NOR Flash

NOR Write OK through 0x2003800.

Enter the U-boot or application file name (enter 'none' to skip):

D:\PROJECTS\NOR_WR\led.bin

Enter the U-boot or application entry point:

0x81080000

Enter the U-boot or application load address:

0x81080000

Erasing the NOR Flash

Erased through 0x2040000

Erase Completed

Writing the NOR Flash

NOR Write OK through 0x2020010.

Writing the NOR Flash

NOR Write OK through 0x2028000.

NOR Write OK through 0x2028E30.

     NOR boot preparation was successful!

 When I try to boot via this nor by changing to NOR boot method, I get this in hyper terminal:

DM6446 initialization passed!

Booting TI User Boot Loader

        UBL Version: 1.65

        UBL Flashtype: NOR

Starting NOR Copy...

CFI Query...passed.

NOR Initialization:

        Command Set: Intel

        Manufacturer: INTEL

        Size: 0x00000010 MB

Bad magic number, read as 0xA1ACED66

NOR Boot failed.

Aborting...

Whats wrong?

Regards azhagiri S

  • Update: I have also tried c6000.spectrumdigital.com/.../How_to_Flash_U-Boot_on_DaVinci_EVM.pdf and the result is
    as below, "LOADING U-BOOT TO DVEVM NOR FLASH MEMORY":

    [ARM9_0] Enter the File Name
    D:\PROJECTS\NOR_WR\u-boot-567-nor.bin
    Burn Offset
    1
    Do a global Erase
    N
    FlashWriter Version 1.9
    Starting Download to NOR Flash
    Image is 131072 bytes long
    Reading Image from: 81000000
    Writing Image to: 02000001
    No Flash devices have been found
    NOR Flash Verify Failed @ 0x0


    Please suggest me what is the solution for this?

    -Azhagiri
  • Hi,

    Does your u-boot version require a UBL in the NOR flash (Y/N)?

    Y

    Enter the UBL file Name (enter 'none' to skip):

    D:\PROJECTS\NOR_WR\UBL_DM6446_NOR.bin

    Erasing the NOR Flash

    In this case, UBL is not require.
    So, don't use UBL and provide the "LED.bin" directly.

    Proceed like that:

    Does your u-boot version require a UBL in the NOR flash (Y/N)?
    N

    Enter the U-boot or application file name (enter 'none' to skip):

    D:\PROJECTS\NOR_WR\led.bin
  • Hi,

    Thank You.

    I previously have tried with

    Does your u-boot version require a UBL in the NOR flash (Y/N)?

    N

    in the first trial and the result on both the cases are same for me.

    [ARM9_0] Starting DM644x_NORWriter.

    CFI Query...passed.

    NOR Initialization:

    Command Set: Intel

    Manufacturer: INTEL

    Size: 0x10 MB

    Does your u-boot version require a UBL in the NOR flash (Y/N)?

    Y

    Enter the UBL file Name (enter 'none' to skip):

    D:\PROJECTS\NOR_WR\UBL_DM6446_NOR.bin

    Erasing the NOR Flash

    Erased through 0x2020000

    Erase Completed

    Writing the NOR Flash

    NOR Write OK through 0x2003800.

    Enter the U-boot or application file name (enter 'none' to skip):

    D:\PROJECTS\NOR_WR\led.bin

    Enter the U-boot or application entry point:

    0x81080000

    Enter the U-boot or application load address:

    0x81080000

    Erasing the NOR Flash

    Erased through 0x2040000

    Erase Completed

    Writing the NOR Flash

    NOR Write OK through 0x2020010.

    Writing the NOR Flash

    NOR Write OK through 0x2028000.

    NOR Write OK through 0x2028E30.

    NOR boot preparation was successful!

    Hyper terminalL:

    DM6446 initialization passed!

    Booting TI User Boot Loader

           UBL Version: 1.65

           UBL Flashtype: NOR

    Starting NOR Copy...

    CFI Query...passed.

    NOR Initialization:

           Command Set: Intel

           Manufacturer: INTEL

           Size: 0x00000010 MB

    Bad magic number, read as 0xA1ACED66

    NOR Boot failed.

    and now I have tried as suggested by you and my console log is as below:

    [ARM9_0] Starting DM644x_NORWriter.

    CFI Query...passed.

    NOR Initialization:

    Command Set: Intel

    Manufacturer: INTEL

    Size: 0x10 MB

    Does your u-boot version require a UBL in the NOR flash (Y/N)?

    n

    Enter the U-boot or application file name (enter 'none' to skip):

    D:\PROJECTS\NOR_WR\led.bin

    Erasing the NOR Flash

    Erased through 0x2020000

    Erase Completed

    Writing the NOR Flash

    NOR Write OK through 0x2008000.

    NOR Write OK through 0x2008E20.

    NOR boot preparation was successful!

    And then I have turn off the EVM and changed switch mode to NOR as below

    • Make sure the Boot Mode / Configuration Select Switch S3 is set for the NOR boot mode -
    S3:1 S3:2 S3:3 S3:4 S3:5 S3:6 S3:7 S3:8 S3:9 S3:10
    ON OFF ON OFF ON ON ON ON ON ON

    and gave a power restart. my hyper-terminal displays nothing..!!

    -Azhagiri

  • Hi,
    Terminal won't display anything unless you have UART code on LED.bin while you build without UBL.
    How did you convert *.out to *.bin and what documents referred for that ?

    Boot mode settings seems to be perfect since it was booting well and got displayed (UBL prints) in terminal while you build with UBL.
  • Hi,

    1) I have taken LED blinking code so that even UART dint display anything I could able to see the changes. but no LED is glowing I am trying this LED code by spectrum digital: do I need to make changes in it?

    2)I have referred : e2e.ti.com/.../423484 for .bin generation

    as given in e2e.ti.com/.../1296486

    3) meanwhile I will include a UART message in my code

    regards.
  • Code is based on what core ?
    ARM or DSP ?
  • Here is the LED code from which I have generated led.bin  file and using in this exercize

    /*
    * Copyright 2005 by Spectrum Digital Incorporated.
    * All rights reserved. Property of Spectrum Digital Incorporated.
    *
    * Not for distribution.
    */

    /*
    * LED Test
    *
    */

    #include "stdio.h"
    #include "davincievm.h"

    /* ------------------------------------------------------------------------ *
    * *
    * Testing Function *
    * *
    * ------------------------------------------------------------------------ */
    void TEST_execute( Int16 ( *funchandle )( ), char *testname, Int16 ledmask )
    {
    Int16 status;

    /* Display test ID */
    printf( "%02d Testing %s...\n", ledmask, testname );

    /* Call test function */
    status = funchandle( );

    /* Check for test fail */
    if ( status != 0 )
    {
    /* Print error message */
    printf( " FAIL... error code %d... quitting\n", status, testname );

    /* Software Breakpoint to Code Composer */
    SW_BREAKPOINT;
    }
    else
    {
    /* Print error message */
    printf( " PASS\n", testname );
    }
    }

    extern Int16 led_test( );

    /* ------------------------------------------------------------------------ *
    * *
    * main( ) *
    * *
    * ------------------------------------------------------------------------ */
    void main( void )
    {
    /* Initialize BSL */
    DAVINCIEVM_init( );
    led_test();

    // TEST_execute( led_test, "LEDs", 1 );

    printf( "\n***ALL Tests Passed***\n" );
    SW_BREAKPOINT;
    }

    ---------------------------------------------------------


    /*
    * Copyright 2005 by Spectrum Digital Incorporated.
    * All rights reserved. Property of Spectrum Digital Incorporated.
    *
    * Not for distribution.
    */

    /*
    * LED Test
    *
    */

    #include "davincievm.h"
    #include "davincievm_led.h"

    /* ------------------------------------------------------------------------ *
    * *
    * led_test( ) *
    * *
    * ------------------------------------------------------------------------ */
    Int16 led_test( )
    {
    Int16 retcode = 0;
    Int16 i, j;

    /* Initialize the LED module */
    DAVINCIEVM_LED_init( );

    /* Running Eight LED test */
    for ( j = 0 ; j < 25 ; j++ )
    {
    for ( i = 0 ; i < 8 ; i++ )
    {
    retcode |= DAVINCIEVM_LED_on( i );
    DAVINCIEVM_waitusec( 250000 );
    }

    for ( i = 0 ; i < 8 ; i++ )
    {
    retcode |= DAVINCIEVM_LED_off( i );
    DAVINCIEVM_waitusec( 250000 );
    }

    /* Check for any errors when running the test */
    if ( retcode )
    return -1;
    }

    return 0;
    }4048.led.rar

  • Code is based on ARM