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.

TMS320C5515: SD Card Erroneous Boot

Part Number: TMS320C5515

Hello,

We're periodically having an issue where it seems as though the C5515 on our PCB is trying to load an image from the SD card, however, at the time of the boot the SD card has no files on it.

We currently boot off of 2 devices, either NOR Flash or USB.

The PCB's come in and we load a bootloader onto them over USB which then takes a *.bin file via USB and programs it into NOR flash.

Then if you pull power from the device and then reapply power, it boots up from NOR flash and everything's fine.

A few times now though we have found that a board is plugged into the computer via USB to load the bootloader, but the computer never recognizes that a USB device was plugged in.

We then found that removing the SD card from the board and plugging it back into the computer via USB made it so that the computer recognized that a device was plugged in and we were able to perform the bootload process.

Somehow the SD card was preventing the C5515 internal bootloader from ever getting to the USB bootload point.

We were able to verify this on another board with the same SD card, so it would seem that it has something to do with the SD card.

Problem is, why are our boards assumingly getting stuck trying to load an image from the SD card if the SD card is blank (blank as in no files but the SD card is formatted).

Putting the same SD card into the product AFTER it has a valid image in NOR flash works fine (since the NOR flash boot point is before the SD card boot point).

The C5515 is then able to read and write to the SD card and no issues are present.

Any input on the matter would be great.

Thanks,

Ben

  • Hi Ben,

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

    Best Regards,
    Yordan
  • Ben,
    Interesting problem.
    Just thinking out loud, does advisory 2.0.9 apply to your case? www.ti.com/.../sprz308d.pdf
    Probably isn't relevant to what you are seeing, but wanted to ask.

    Yes, SD is after NOR during the boot sequence, so its hard to say what might be tripping it up.

    Lali
  • Hi Lali,

    Yes, advisory 2.0.9 did apply to us.

    We had to do another board rev some time ago which used the workaround stated in the errata.

    Thanks,

    Ben

  • Ben,

    I'm checking with some folks internally on this, and will post back here when there is a response.

    Lali

  • Thanks!

    If I find out anything else on my end I will post it.

    Below is a point form of the whole issue currently:

    1. We are using the C5515 in a product and it is designed to boot from NOR flash or USB.

    2. When there is no valid image in NOR flash the C5515 boots from USB.

    3. We have the C5515 connected to a SD card which we use to save data to.  We do not use the SD card to boot from.

    4. Periodically we have an issue where if there is no valid image in NOR flash, the C5515 never makes it to the USB bootloader.  We found that by removing the SD card from the unit the C5515 gets to the USB bootloader.

    5. The SD card works fine in our application when we want to save or read from it.

    Thanks,

    Ben

  • Hi Ben,

    Do you have pull-ups on the SD card pins especially on CMD?

    Also, would you be able to connect the board to CCS without a GEL and see where the bootloader is stopping?

    The program counter value, we should see the bootloader symbol to figure out where its getting stuck.

    Lali

  • Hi Lali,

    Yes, we do have 12.1K pull ups on all 6 SD Card pins (CLK, CMD and data pins).

    The debug session I performed had the PC stuck between addresses 0xFFBBB3 to 0xFFBBD4 (see below picture).

    Thanks,

    Ben

  • Hi Ben,
    The screenshot did not come through the reply. Can you please re-post? Thanks.
    Lali
  • I'm trying to post the picture again, it didn't take in the previous post.

  • Also, here is the schematic for the SD Card Interface.

  • Ben,

    Please try this on the SD card:

    1. Download SD card formatter from https://www.sdcard.org/downloads/formatter_4/

    2. Format the SD using the formatter to FAT32

    3. Copy the boot5505.bin to the root directory of the formatted SD card

    4. Insert the SD card into the SD card slot

    5. Power cycle the C5515 EVM to reboot

    Besides that, could you try programming the SD card using an external SD card reader on a PC or a batch SD card copier?

    Could you also try putting a boot image on something like SPI which is before SD to see if that works?


    /cfs-file/__key/communityserver-discussions-components-files/791/0131.Dummy.zip

  • Hi Lali,

    We have also noticed in the past that if we have interrupts enabled, the method MMC_Read() in CSL v3.04 occasionally gets stuck in an infinite loop looking for the status bits of the MMCST0 register to change.

    The below code shows the area, when it reads MMCST0, it never gets a value to leave the do loop.

    				do
    				{
    					do
    					{
    						status = hMmcsd->mmcRegs->MMCST0;
    						if((status & CSL_MMCSD_DATA_TOUT_CRC_ERROR) != 0)
    						{
    							reIssueReadFlag = 1;
    							break;
    						}
    
    					} while((status & CSL_MMCSD_READ_READY) != CSL_MMCSD_READ_READY);
    
    					if(reIssueReadFlag == 1)
    					{
    						break;
    					}

    I don't know if the same libraries are used in the TI bootloader code, but I figured I'd share this finding.

    Thanks,

    Ben

    Edit:  I just saw your last post about the sd card on May 5.  I will try those instructions and let you know the outcome.

  • Hi Lali,
    We do not have the C5515 EVM, only the eZdsp USB Stick.
    However, I did try the SD Card formatter link in your post.
    After using the SD Card formatter on the SD cards that we're causing the failures, our product booted fine with the SD card inserted.
    I have tried in the past and today using the SD card formatter in Windows, but that did not solve the problem.
    The formatting tool you provided seems to format the SD card differently from the tool in Windows.
    Could there be some type of value in the MBR that the TI Bootloader is not expecting to see on the SD card?
    Thanks,
    Ben
  • Hi Ben,

    Glad that it started working with the different format tool.

    The C55xx bootloader only supports the single partitioned SD card. The SD card formatter from SD card association formatted the SD card into single partition by default, while the Window’s formatter keesp whatever partition is by default,

    If the SD card was formatted as multiple partitions, then it will not work with the C55xx bootloader.

    Lali

  • Hi Lali,
    This is outside the scope of the thread, but do you know of a way to verify if a SD card is formatted as multiple partitions?
    Thanks,
    Ben
  • Hi Lali,

    I was able to read the MBR from a good known working SD card and a SD card that caused the bootloader to stall.

    It would seem that there is garbage data in the partition section of the SD card that causes the bootloader to stall.

    On the working SD card there is only one partition present.

    Below is the tail end of the data from the first sector of the SD card:

    Working Non Working
    [200] 0 [200] 2910
    [201] 0 [201] 30025
    [202] 0 [202] 63494
    [203] 0 [203] 16835
    [204] 0 [204] 187
    [205] 0 [205] 24576
    [206] 0 [206] 27238
    [207] 0 [207] 60160
    [208] 0 [208] 17072
    [209] 0 [209] 20303
    [210] 0 [210] 19796
    [211] 0 [211] 21063
    [212] 0 [212] 8224
    [213] 0 [213] 8224
    [214] 0 [214] 2573
    [215] 0 [215] 25938
    [216] 0 [216] 28525
    [217] 0 [217] 25974
    [218] 0 [218] 25632
    [219] 0 [219] 29545
    [220] 0 [220] 29547
    [221] 0 [221] 28448
    [222] 0 [222] 8306
    [223] 512 [223] 29807
    [224] 12 [224] 25960
    [225] 14342 [225] 8306
    [226] 47352 [226] 25965
    [227] 137 [227] 26980
    [228] 0 [228] 11873
    [229] 40823 [229] 3583
    [230] 58 [230] 17418
    [231] 0 [231] 29545
    [232] 0 [232] 8299
    [233] 0 [233] 29285
    [234] 0 [234] 28530
    [235] 0 [235] 65394
    [236] 0 [236] 2573
    [237] 0 [237] 29264
    [238] 0 [238] 29541
    [239] 0 [239] 8307
    [240] 0 [240] 28257
    [241] 0 [241] 8313
    [242] 0 [242] 25963
    [243] 0 [243] 8313
    [244] 0 [244] 28532
    [245] 0 [245] 29216
    [246] 0 [246] 29541
    [247] 0 [247] 24948
    [248] 0 [248] 29810
    [249] 0 [249] 2573
    [250] 0 [250] 0
    [251] 0 [251] 0
    [252] 0 [252] 0
    [253] 0 [253] 44032
    [254] 0 [254] 55499
    [255] 0xAA55 (Hex) [255] 0xAA55 (Hex)

    Why the stall?

    If the boot device (in this case the SD card) is somehow invalid, how come the logic was that the bootloader just sits and does not move onto the USB bootloader portion?

    Thanks,

    Ben