johnwallace123
Posts: 16
Joined: Tue Feb 28, 2017 12:35 am

[SOLVED] Cannot flash CM3

Fri Mar 31, 2017 11:53 am

I am currently designing a CM3-based product to be installed in remote locations, and we'd like to be able to recover from early-stage boot failure (like bad config.txt or cmdline.txt). In order to do so, we've enabled a failsafe watchdog timer that disables the on-board eMMC and are using the network boot procedure described in https://www.raspberrypi.org/documentati ... des/net.md

However, now that we've set the "program_usb_boot_mode" OTP bit, I can no longer flash the eMMC of the CM3. I have tried using our prototype boards and the CMIO board. I can successfully program CM3s without the USB boot mode bit set, but swapping the same setup for a netboot-enabled CM3, I only see the solid PWR/ACT LEDs, and rpiboot does not detect the CM3.

Questions:
  • Does enabling USB boot mode prevent the CM3 from booting in device mode? If so, have I effectively bricked my CM3?
  • Is there a good way to flash the eMMC from a running system (also could be helpful for standard RPis)?
  • Is there a way to force USB device mode using the OTG GPIO pin?


Thanks!
Last edited by johnwallace123 on Mon Apr 03, 2017 1:32 pm, edited 1 time in total.

nixy82
Posts: 42
Joined: Sat Sep 12, 2015 9:19 am

Re: Cannot flash CM3

Fri Mar 31, 2017 4:34 pm

+1
I did this too and can't access the eMMC any more either

johnwallace123
Posts: 16
Joined: Tue Feb 28, 2017 12:35 am

Re: Cannot flash CM3

Mon Apr 03, 2017 1:31 pm

OK, I think I figured this one out, and I'll be nice and share with the class. It appears that this is due to design of our PCB and the behavior of the OTGID pin. With the "program_usb_boot_mode" OTP bit set, if the OTGID pin is low at boot and there is no eMMC, then the CM3 will attempt to boot in host mode, reading from the USB (either ethernet or MSD). If the OTGID pin is high, the CM3 will boot in device mode, ready for eMMC flashing (via rpiboot).

In our case, the PCB has OTGID connected directly to ground (as in the RPi3), thereby always forcing host boot mode. Using the CMIO board, it was fairly simply to construct a circuit that connected +5V to OTGID via a switch and LED. With a CM3 with "program_usb_boot_mode" OTP bit set, booting while pressing the switch (and LED lit), the CM3 enters device mode, and I can flash it. However, booting while switch is open (and LED dark), the CM3 enters host mode and attempts to boot from USB.

Relevant docs: https://www.raspberrypi.org/documentati ... ootflow.md

Return to “Compute Module”