0

I am using a Pro Micro as a HID touchpad, connected to a laptop running Ubuntu 17.04. Everything works, except that the board freezes or hangs while the computer boots or resumes from standby, requiring me to disconnect and reconnect it every time.

The board is definitely hanging, not resetting; I have programmed the on-board LEDs to flash in sequence during the setup and loop stages and have determined that the board hangs at random points in the program and does not reset. This suggests to me that the problem lies with the computer or the connection rather than the Arduino.

The hangs occur at specific points during the computer's boot sequence. If I boot with the Arduino connected, it will hang very early in the boot while the manufacturer's logo is visible on screen. If I connect the board at GRUB, the board will hang during Ubuntu's boot sequence, somewhere among the commands to initialize hard disk buses. Less predictably, the board will hang about 75% of the time just after logging in or when resuming from standby (just before the login manager appears).

I wonder whether the power supply may be dropping by some amount sufficient to halt execution, but not enough to reset the board, but I don't know if that's a realistic hypothesis. I don't know how to investigate further.

What could be causing this issue? What steps could be taken to determine and solve the problem?

Edit - February 2018

I have updated my operating system to Ubuntu 17.10, which uses GNOME Display Manager for the login prompt instead of LightDM, and the problem no longer occurs when resuming from suspend. So it appears the communication that froze the Arduino was triggered by LightDM, not the BIOS.

  • 1
    Does it always happen at the same time during boot? I.e., is it during the BIOS probing of the USB devices, or during the OS kernel boot sequence, etc? – Majenko Nov 29 '17 at 10:52
  • @Majenko, I've added the information you requested in the 3rd paragraph. – Ian Mackinnon Dec 3 '17 at 9:39
  • It sounds like it's trying to put the board into boot keyboard mode and failing. There may be a bug in the Arduino USB stack. – Majenko Dec 3 '17 at 9:52
  • OK. Do you know of any way to debug that? Given that the computer is booting and the Arduino ends up hanging, I'm not sure how I could capture the communication packets. – Ian Mackinnon Dec 3 '17 at 11:05
  • I would resort to using my TotalPhase Beagle 480, but that's out of the question for you. I can try and replicate it some time, but I don't have much time right now. – Majenko Dec 3 '17 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.