1

We have developed a bootloader for a F28M36x Concerto microcontroller (Texas Instruments), which loads the software from a USB stick. We have integrated the USBlib in the bootloader (see API guide here).

The boot from USB stick works; however it takes very long time to detect USB pen drives with high capacity. To be precise, it takes long time to get the event "MSC_EVENT_OPEN" in the callback MSCCallback() function that is passed to the API USBHMSCDriveOpen()

g_ulMSCInstance = USBHMSCDriveOpen(0, MSCCallback);

Currently, this is the first event that allows the bootloader understanding that a pendrive is present.

So, we have set a timer of about 5 seconds: if the MSC_EVENT_OPEN event is triggered before the timer expires, then the bootloader loads the SW application from USB. If the timer expires without having detected any USB driver, it loads the software from the flash. So the problem is that the boot of the software after power on takes long time, because it waits in vain for the presence of a USB pendrive, which in 99% of cases is not plugged in.

So the question is: is it possible (by calling a proper USBlib API or in any other way), to understand immediately that a USB pen drive is plugged in? If we could make a fast detection of the USB drive, we would avoid waiting 5 seconds in vain: if the USB pen drive is not physically present, the bootloader would start immediately loading the application from the flash.

A. Amori
  • 73
  • 8

0 Answers0