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.

OMAP-L138-EP Bootload

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

All:

I have been unsuccessful so far in loading ARM+Bootload code from NAND flash into the OMAP-L138-EP on our target board. 

I have been able to do similar load from NAND flash on the LCDK138 board.

Probably the major difference is the input clock - the target uses a 50 MHz input clock the LCDK uses a 24 MHz oscillator.

We have done some tracing of the situation, and after the various power supplies have come up, and there is a clock to the -EP, Reset is taken inactive. At this point we do see activity on the chip-select-2 line, so it appears that there is an attempt to read the NAND memory.

After the ARM loads, it establishes contact with the outside world via UART. We are not seeing that on the target.

If I load the ARM via Code Composer Studio (v.6.1.1.xxx), I can run the code that would normally have been loaded via boot, and there is a place where the DSP code is then loaded from the same NAND flash, and that works. When I then jump to DSP space, the code executes as designed!

By the way, all of this has worked on the LCDK board...

1. Can the bootloader run at a vastly different frequency?

2. Are there steps to be taken to prepare the bootloader to run at the external 50 MHz vs. 24 MHz oscillator?

Thanks!

  • Dear Todd,


    2. Are there steps to be taken to prepare the bootloader to run at the external 50 MHz vs. 24 MHz oscillator?

    Yes.
    Which bootloader are you using ?
    If its starterware bootloader, please refer below.

    Have you modified the starterware bootloader source code for your newer PLL settings (multiplier, divider,CLKSRC etc.,) ?
    C:\ti\OMAPL138_StarterWare_1_10_04_01\bootloader\include\armv5\omapl138\bl_platform.h
    #ifdef ARM_300MHZ
    /* Fixing PLL0 register values */
    #define PLL_CLK_SRC 0
    #define PLL0_MUL 24
    #define PLL0_PREDIV 0
    #define PLL0_POSTDIV 1
    #define PLL0_DIV1 0
    #define PLL0_DIV3 2
    #define PLL0_DIV7 5

    C:\ti\OMAPL138_StarterWare_1_10_04_01\bootloader\src\armv5\omapl138\bl_platform.c

    /* Set the PLL0 to generate 300MHz for ARM */
    PLL0Init(PLL_CLK_SRC, PLL0_MUL, PLL0_PREDIV, PLL0_POSTDIV,
    PLL0_DIV1,PLL0_DIV3, PLL0_DIV7);

    Also, please run the debug gel file with NAND boot mode (once its get stuck and not booting no more)

  • Titus:

    Thanks - I have made changes in the bl_platform.h file

    #ifdef ARM_300MHZ_ext
     /* Fixing PLL0 register values */
     #define PLL_CLK_SRC       1 // for external 50 MHz clock
     #define PLL0_MUL               5 // for 300 MHz
     #define PLL0_PREDIV         0 
     #define PLL0_POSTDIV       0
     #define PLL0_DIV1               1
     #define PLL0_DIV3               3
     #define PLL0_DIV7               5
    #endif

    This is rebuilt and then merged with .ais file.

    Are there any changes to be made other than this? Is there something that needs to be done to .ais file that merges with the arm output?

     

  • Dear Todd,

    Are there any changes to be made other than this? Is there something that needs to be done to .ais file that merges with the arm output?

    I think, yes.
    AIS settings may override the PLL settings but not sure since bootloader code is also initialize the PLL settings.
    Any way, its better to do AIS settings with the same PLL register values.

    I suggest you to boot some ARM based LED (GPIO toggle) or (small test code) UART.

    If still, the code is not booting, please run debug gel file and tell us where the code stuck is (PC location)
  • Titus:

    Yes, it turns out that AIS settings also needed to match those of the OMAP processor.

    We are using HexAIS_OMAP-L138.exe to create the AIS portion of the ARM load, and it has an initialization (.ini) file that needed to be changed.

    Once I set the .ini file up with the proper settings, we were able to boot and load the ARM from NAND flash.

    Once loaded and running (system clock = 300 MHz, DDR clock = 150 MHz, EMIFA clock = 100 MHz), there still seems to be a problem with the UART setting - I am asing it to run at 115200 BAUD, but for some reason, it sets up 57600 BAUD instead. Do I need to set the UART parms instead of relying on UARTStdioInit() to set the proper Baud rate?

     

  • Sounds good Todd.
    Thanks for your update.


    Do I need to set the UART parms instead of relying on UARTStdioInit() to set the proper Baud rate?

    UART change is not required unless we change the DSP/ARM clock (300MHz). But you are running 300MHz default clock, so its not required.

    C:\ti\OMAPL138_StarterWare_1_10_04_01\platform\lcdkOMAPL138\uartConsole.c

    /* Configuring the UART parameters*/
    /* 8-bit work length, no parity, 1 stop bit. */
    /* The UART module input frequency shall be 150MHz.*/
    UARTConfigSetExpClk(UART_CONSOLE_BASE,
    SOC_UART_2_MODULE_FREQ,
    baudRate,
    UART_WORDL_8BITS,
    UART_OVER_SAMP_RATE_16);

    Have you tried to run any UART example through emulator & CCS and got success ??

    If yes, then we need look into AIS settings again.

  • Titus:

    I did run the UART example on our target, and it ran at 115200 BAUD. (CCS setup is good...) I will compare the code to our code and see what's different with respect to stand-alone usage.

  • Hi Todd,
    Can you please share the AIS tool's *.cfg file which you have modified for 50MHz clock input ?
    We want to investigate on this.
    If you don't wish to share here, please email to me, x0213399@ti.com

    Thanks for your understanding.
  • Titus:I have sent it to your email address. Let me know if you receive it okay.