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.

Example 3 - Running from external memory (DDR) for C6670

Hi,

I tryed to follow the example from wiki for my C6670

the examples 1 and 2 have worked for me, now I want to use DDR, so I done the example 3 and 4. The project has been loaded without any errors, it runs, but I do not see the LED blinking. What can be a cause? 

  • The code is stop at main after loading the code to core ?
    Can you please attach the project ?
  • Moved this thread over keystone forum. Thank you.
  • Hi,

    DDR initialization is not done on led_play example code(PLL and DDR bits are not enabled on platform_init_flags sFlags). Better to use the c6670 GEL file initialize the EVM and the run the LED play example from external DDR memory. I have tested the same example with GEL file, It is working fine.

    void EVM_init()
    {
        platform_init_flags sFlags;
        platform_init_config sConfig;
        int32_t pform_status;
     
        /* Initialize the UART */
        platform_uart_init();
        platform_uart_set_baudrate(115200);
        (void) platform_write_configure(PLATFORM_WRITE_ALL);
     
        /*
         * You can choose what to initialize on the platform by setting the following
         * flags. Things like the DDR, PLL, etc should have been set by the boot loader.
         */
        memset( (void *) &sFlags, 0, sizeof(platform_init_flags));
        memset( (void *) &sConfig, 0, sizeof(platform_init_config));
     
        sFlags.pll = 0; /* PLLs for clocking */
        sFlags.ddr = 0; /* External memory */
        sFlags.tcsl = 1; /* Time stamp counter */
        sFlags.phy = 0; /* Ethernet */
        sFlags.ecc = 0; /* Memory ECC */
        sConfig.pllm = 0; /* Use libraries default clock divisor */
     
        pform_status = platform_init(&sFlags, &sConfig);
     
        /* If we initialized the platform okay */
        if (pform_status != Platform_EOK) {
            /* Initialization of the platform failed... die */
            platform_write("Platform failed to initialize. Error code %d \n", pform_status);
            platform_write("We will die in an infinite loop... \n");
            while (1) {
                (void) platform_led(1, PLATFORM_LED_ON, PLATFORM_USER_LED_CLASS);
                (void) platform_delay(50000);
                (void) platform_led(1, PLATFORM_LED_OFF, PLATFORM_USER_LED_CLASS);
                (void) platform_delay(50000);
            }
        }
     
        return;
    }

    Based on C6670 silicon errata user not able to run the application from external DDR memory. If you want to run the example on DDR memory means, you need to run the DDR initialization code from corepac L2 memory and then access the DDR memory. For more information refer PCIe boot examples and readme.pdf file(C:\ti\mcsdk_2_01_02_06\tools\boot_loader\examples\pcie\docs\README.pdf).

    9.3 How HelloWorld boot example works
    The Linux host first pushes the DDR init boot image data to L2 memory of core 0, then writes the boot entry address of the DDR init boot image to the magic address on core 0, both via PCIE. When the EVM is in PCIE boot mode, the IBL code running on the DSP core 0 polls the entry address and jumps to that address and starts to boot (initialize the DDR). After DDR is properly initialized, the DDR init code clears the magic address and keeps on polling it.

    Linux host then pushes the HelloWorld boot image data to DDR memory, then writes the boot entry address of the HelloWorld boot image to the magic address on core 0 to boot core 0. Core 0 starts to boot and print the “Hello World” booting information, and then boot all the other cores by writing the address of _c_int00 to the magic address on other cores and sending an IPC interrupt to other cores. The RBL running on other cores will jump to _c_int00 and start to boot,
    each core will write 0xBABEFACE to its magic address by running a function write_boot_magic_number().

    Note that host boot application needs to wait for some time after pushing the DDR init boot image and before pushing the HelloWorld boot image to the DDR, this will ensure DDR is properly initialized.

    Thanks,

  • Try to run the led play example with GEL file.