7

According to official bootmodes documentation, the process of booting Raspberry Pi 3 off USB takes two seconds to wait for mass storage devices (MSD) to enumerate.

That article also says it is also possible to increase this timeout to five seconds by adding certain parameter to config.txt file (program_usb_timeout=1). But where should this file reside? Normally, it is placed next to bootcode.bin, but while we're waiting for MSD to enumerate, we can't read files from it.

Should a SD card with config.txt be inserted in Raspberry Pi before booting off USB in order to increase USB enumeration timeout to 5 seconds?

PS I've got another thought after I've written this question. Is USB enumeration timeout programmed into OTP area of BCM2837 along with enabling USB boot mode?

Glorfindel
  • 620
  • 1
  • 9
  • 16
Alexandr Zarubkin
  • 183
  • 1
  • 1
  • 6

3 Answers3

6

Please note the command program_usb_timeout=1 is wrong. The right command is program_usb_boot_timeout=1 The documentation was updated. You can double check if the OTP was programmed correct by vcgencmd otp_dump | grep 66 at row 66, bit 24 should be set: 66 : 01000000

Yorch
  • 61
  • 1
  • 1
5

There are two different things which go by the same name program_usb_boot_timeout (previously called program_usb_timeout): the OTP bit and the corresponding parameter in config.txt. The latter is used to set the former (by booting from SD card), but once the OTP bit is set, there is no need for the SD card anymore. And just in case it's not clear, OTP is a kind of flash memory, so its content is persistent across reboots.

So the full procedure goes like this:

  • prepare a bootable SD card and boot from it
  • run sudo BRANCH=next rpi-update
  • add program_usb_boot_timeout=1 to your config.txt
  • reboot (this is the moment OTP bit will be programmed)
  • power off, remove the SD card and plug USB device
  • power on.

The whole process is described in more details here.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
-1

Yes your command

program_usb_timeout=1

Should be placed in the config.txt file on an sdcard as it is the amount of time to wait before connecting to USB devices so it would be impossible to store this information on a device it should be waiting to read from.

Mohammad Ali
  • 2,373
  • 1
  • 12
  • 18