10. Reviving an unresponsive Balboa 32U4
In order to load a new program onto your A-Star 32U4 device, you will need to get it into bootloader
mode and send programming commands to it over its virtual serial port using appropriate software. If
you are programming the device from the Arduino IDE, the sketch loaded onto the device will generally
support a special USB command for putting it in bootloader mode, and the Arduino IDE sends that
command automatically when you click the Upload button. However, you might find yourself in a
situation where the device is unresponsive and that method will not work. This can happen for two
reasons:
• You accidentally loaded a malfunctioning program onto the device that is incapable of
responding to the special USB command. For example, your program might be stuck in an
infinite loop with interrupts disabled.
• You loaded a program which uses a non-standard type of USB interface or no USB interface.
The following sections provide different procedures you can use to revive your device.
10.1. Reviving using the Arduino IDE
This section explains two special methods for programming an A-Star (or another of our 32U4 family
of boards) using the Arduino IDE in case your usual method of programming is not working. These
instructions were developed for the Arduino IDE versions 1.0.5-r2 and 1.6.0, and they might need to
be modified for future versions.
Reset button
If you have an A-Star 32U4 Micro, you should connect a
[https://www.pololu.com/product/1400]
between the GND and RST pins to serve as a reset button. Other
boards in our 32U4 family have a reset button you can use. Alternatively, you can use a wire to
temporarily connect GND and RST together instead of using a reset button.
Resetting the board twice within 750 ms makes the board go into bootloader mode. The bootloader
will exit after 8 seconds and try to run the sketch again if it has not started receiving programming
commands. To revive the device, you need to make sure you start sending it programming commands
before the 8-second period is over.
In bootloader mode, the yellow LED (the one labeled
LED 13
) fades in and out. It is useful to look at
this LED so you can know what mode the microcontroller is in. Also, we recommend enabling verbose
output during upload using the Arduino IDE’s “Preferences” dialog. Looking at the LED and looking at
the verbose output during the following procedures will help you understand what is going on.
Pololu Balboa 32U4 Balancing Robot User’s Guide
© 2001–2019 Pololu Corporation
10. Reviving an unresponsive Balboa 32U4
Page 92 of 97