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.

Source code for bootloader?

Other Parts Discussed in Thread: OMAPL138

I'm inspecting the bootloader app in OMAPL138_StarterWare_1_10_04_01. There's no CCS project for the EVMOMAPL137, so I'm looking at the one for lcdkOMAPL138.  Browsing through the code, there's no source for either of these functions, just library for them:

    /* Spi Initialization */
    BlPlatformSPISetup();
    BlSPIConfigure();

Is it available?  If so, could you post?

Thanks.

Steve

  • It's actually the functions called by those functions that have no source...
  • Dear Steve,
    LCDK board doesn't have SPI flash and it has NAND flash, so you won't find SPI source in LCDK section but EVM.
  • Hi Steve,

    yes, the definitions are available in the file, "bl_platform.c"  and "bl_spi.c" located at "~\OMAPL138_StarterWare_1_10_04_01\bootloader\src\armv5\omapl138" and "~\OMAPL138_StarterWare_1_10_04_01\bootloader\src" respectively.


    void BlPlatformSPISetup(void)
    {
        /* Enable PSC for SPI */
        PSCModuleControl(SOC_PSC_1_REGS, HW_PSC_SCR0_SS, 0, PSC_MDCTL_NEXT_ENABLE);

        /* Setup SPI PINMUX */
        SPIPinMuxSetup(1);
        SPI1CSPinMuxSetup(0);
    }

    void BlSPIConfigure(void)
    {
        unsigned int val;

        SPIReset(SPI_BASE);

        SPIOutOfReset(SPI_BASE);

        SPIModeConfigure(SPI_BASE, SPI_MASTER_MODE);

        SPIClkConfigure(SPI_BASE, SPI_INPUT_FREQ, SPI_SCLK_FREQ,
                              SPI_DATA_FORMAT0);

        val = SIMO_SOMI_CLK_CS;
        SPIPinControl(SPI_BASE, 0, 0, &val);

        SPIDefaultCSSet(SPI_BASE, SPI_CS_INACTIVE_STATE);

        /* Configures SPI Data Format Register */
        SPIConfigDataFmtReg(SPI_DATA_FORMAT0);

        /* Selects the SPI Data format register to used and Sets CSHOLD
         * to assert CS pin(line)
         */
        SPIDat1Config(SPI_BASE, (SPI_CSHOLD | SPI_DATA_FORMAT0), SPI_CS);

        /* Enable SPI communication */
        SPIEnable(SPI_BASE);
    }