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.

RTOS/OMAP-L138: Restore NAND flash through SD Card

Part Number: OMAP-L138
Other Parts Discussed in Thread: OMAPL138

Tool/software: TI-RTOS

Hi, we have developed a custom board based on the OMAP-L138 LCDK, but with some differences (codecs chips, etc.)

In doing this we have removed UART-USB serial and therefore I am unable to boot using that. I still have an SD Card and NAND Flash.

I wanted to just boot from the NAND Flash and run someone code on the DSP core separately. However since the NAND flash is empty, when I boot from it, and try to use JTAX to load code

into the chip, it tells me the device is still in reset. We checked that the reset signal goes out fine into the OMAP-L138 chip itself. I was wondering if there was a way to restore the LCDK NAND

from an SD CARD from the SD Card boot. Otherwise I don't see another option of being able do this. I don't think it's possible to directly write to the NAND with the JTAG ice.

  • Dmitriy,

    Can you confirm my understanding below:

    1. Your board has boot switches hard wired to NAND boot.
    2. Image on the NAND is corrupted or Empty, is that correct?

    Even if the NAND is empty or corrupted, tere is no reason for the DSP to still be in reset. If the device powers up correctly then the ROM code should execute and you should see the ARM core in the ROM memory address location and not in reset. This seems like a power sequencing issue.

    If you see the LCDK HW, even if the NAND is empty, the board will power up and connect to cores when configured in NAND boot. Let me know if you agree and we can have our HW engineers help you with the HW board debug with this bring up.

    Regards,
    Rahul
  • Hello Rahul,

    That is correct. My board has the boot switches to switch between the NAND and MMC/SD boot. The NAND is empty as this is a brand new board based on the LCDK (a lot of things are removed, but it was checked to be sure.)

    So far I was able to bypass this by setting it to the MMC/SD boot and inserting a card with the U-Boot bootloader and no actualy Kernel/FS which allows me to get it out of reset to program the DSP cores for testing.

    Of course I would love to be able to just switch to NAND boot and just be able to program it. I see this works on the actual LCDK, but not our custom board. I figured there is some preinstalled bootloader on the NAND in the LCDK that I needed as well to be able to boot the cores, but as you as with it being empty I should be able to program the DSP core through the JTAG with the NAND still being empty.

  • Hello again,

    I did some testing. I have took one of the actual LCDK boards and used the the SD card to start U-Boot.
    Through U-Boot I went and erased the NAND completely by using "nand erase.spread 0x20000 80000."
    Which erases the NAND. Then I tried to boot from the NAND and the board turns on, but now I am unable to program
    the DSP core and the CSS JTAG gives the same error, that the device is being held in reset. So I feel like you are unable to
    program the DSP/ARM core through the JTAG with an empty NAND when NAND boot is used.
    At least I'm not able to on the actual OMAP-L138 LCDK nor my custom board.

  • Dmitry,

    I think that I misunderstood the issue. I thought that you are not able to connect to any of the cores ARM or the DSP which is not true. There is a simple explanation for not being able to connect to the DSP.

    OMAPL138 is a ARM boot master device so the DSP will not power up at boot. The ARM needs to bring the DSP out of reset. This is described in the article below:
    processors.wiki.ti.com/.../Boot_Images_for_OMAP-L138

    When NAND is empty and the ARM And DSP are not booting, you should be able to connect to the cores using the setup described here:
    processors.wiki.ti.com/.../AM1808_EVM_board_using_CCS?

    Regards,
    Rahul
  • Rahul, I understand that the ARM core wakes up the DSP core. However, I am not even able to start the debugging process when the board turns on using the NAND boot and the NAND is empty.

    When I click to debug using JTAG, it tries and gives me the following error:

    "Error connecting to the target:
    (Error -1180 @ 0x0)
    Device is held in reset. Take the device out of reset, and retry the operation.
    (Emulation package 8.0.27.9)

    So I am unable to even attempt to connect to the ARM core first to run the GEL file at all. This happens if the NAND is empty and is being booted from on either my board or the LCDK.

  • Dmitriy,

    This is definitely not the expected behavior from a ROM bootloader perspective, I am not sure what is putting the device in this undefined state but given that you are able to reproduce this on the LCDK made me look for other user issues who have reported similar behavior:

    Can you try to see if this post helps you restore the LCDK setup :
    e2e.ti.com/.../619476

    I will try to look at the ROM boot code to determine what could be causing this issue.

    Regards,
    Rahul
  • Hi Dmitriy,

    on LCDK board JTAG emulation is working fine in such case. I erased entire NAND and swithed boot pins to boot from NAND. After that I can run ARM debugging via JTAG.
  • Rahul,

    I actually looked at that thread when trying to copy the U-BOOT into NAND over TFTP. I was able to copy and load the default 'u-boot-omapl138-lcdk.ais' file that came with the Processor SDK 05.00.00.15, and I have been to this on two separate LCDK boards and BOTH of them get stuck on 'Attempting to boot from NAND' message. It says the version of the Uboot and then attempting to start from NAND then just gets stuck. I guess I can try a 3rd board, we have a few. But for me, neither the U-boot I made from the kernel configurations nor the default one provided the Processor SDK have been able to load from NAND when written to it over TFTP from Uboot started on the SD Card.