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 Boot from SD Card

I am trying to get my OMAP-L138LCDK to boot off of an SD card. I have been reading many of the wiki articles that TI has, but many of them are specifically for using Linux on the ARM side.

I plan on using SYS/BIOS on the DSP and running the ARM bare metal. Right now, my ARM code is simply enabling the DSP and running an infinite loop.

I have used the AISGen tool with both the ARM and DSP out files to create my bin file and placed it in the root of my sd card. Currently the DSP code is blinking an LED and reading in audio data through the McASP (the code has been tested through the CCS emulator and works). The ARM code is setting the Boot address vector for the DSP to  0x11800000 (which is where I explicitly placed _c_int00 for the DSP), as well as waking up the DSP.

Placing the microSD card in the slot and power cycling the board results in nothing happening.

I have also used the OMAPL13X debug gel file to make sure my switches were correct and to see what errors I get. The boot ROM gives me 0x000000C4 which is not a recognizable error.

I'm assuming the problem is either with how I am loading the .ais file in the SD card or how my .ais file is being configured. I did not set a specific entry point in the AISGen and my arm code starts at 0xFFFFF000, not 0x80000000. Could that be a problem?

I am planning on NOT using a DDR2 memory and have setup my DSP code to run in L2 RAM, maybe there is a problem here? Although it runs from the L2 RAM with no problem when I am using CCS.

I also want to make sure that I am not misinterpreting how the boot loader works. My understanding is that the boot loader checks the boot pins to determine the device to load data from. It then reads the AIS file to load the application(s) into RAM and set any configurable registers. Is this correct? Or is there something else I have to do?

Sorry for all of the questions embedded in to one large question. If any more details are needed, please let me know!

  • Hi Raz,

    I've notified the RTOS team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • The .ais file needs to be copied into a raw or unformatted partition. The AIS boot image is expected to be in the user data area of the memory device, written to address 0 of that region. The bootloader detects the AIS image by checking for the magic word (0x41504954).

    Try to flash the ais image to the SD card using SDMMCWriter that is described in the CCS approach.
    processors.wiki.ti.com/.../OMAP-L138_Preparing_SD_Card_for_Boot

    Regards,
    Rahul
  • I have tried placing the AIS file in the sd card both through the CCS project (which was a nightmare to get working with CCS7) and through linux.

    Neither worked. I read from two different sources that the boot loader uses RAM in 0x80000000 as well as 0xFFF00000. I made sure my ARM DSP wakeup code is located away from both of those in 0x80004000.

    Using the debug gel with the ARM side, I now get the ROM Error Code 0x0000001B (SDMMC Error). I cannot find any more documentation about this error and it is very difficult to debug. I did notice that if I load my DSP code (which initializes the PLL and PSC) that the error code becomes 0x00000000. However, no change when trying to boot my code from power on.

    I checked to make sure the correct magic word was in the AIS file and it was.

    I'm running out of ideas here. A lot of the resources for booting off sd card are either incredibly vague, or outdated. Is there anything else I could possibly be missing?

  • An update. It does appear that the SD is being read and updating the PLL and PSC values I have configured in AISgen. I'm assuming that either there is a problem with the remaining AIS loading in the code or that the ARM is not jumping to the correct location. Is there a way I can check which address it is trying to jump to after loading in the data?

  • Raz,

    what all modules does the AIS Gen image try to initialize. does it try to setup DDR? or is that only done through uboot. Have you checked that the resulting clocks (SYSCLK2- SYSCLK6) on the device are not violating the spec. Can you attach the dump from the Debug GEL file so that I can take a look at the PC and the error code and try to correlate it with the ROM code.

    Regards,

    RAhul

  • Hi Rahul. Your hint helped me solve the problem! I noticed that the configuration for initializing the SDRAM (CS0) was set. Since the SDRAM was not connected, I'm assuming that is what caused the hang. As soon as I changed the configuration, it worked! Thank you again for your assistance!