Reviving an unresponsive a-star, Reviving using the arduino ide, Reset button – Pololu A-Star 32U4 User Manual

Page 27

Advertising
background image

8. Reviving an unresponsive A-Star

In order to load a new program onto your A-Star, 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 A-Star from the
Arduino IDE, the sketch loaded onto the A-Star will generally support a special USB command for putting the A-Star
mode 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 A-Star is unresponsive and that method will not work. This
can happen for two reasons:

• You accidentally loaded a malfunctioning program onto the A-Star 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 A-Star.

8.1. Reviving using the Arduino IDE

This section explains two special methods for programming an A-Star 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.5.6-r2, and they might need to be modified for future versions.

Reset button

If you have an A-Star 32U4 Micro, you should connect a

momentary pushbutton

[http://www.pololu.com/product/1400]

between the GND and RST pins to serve as a reset button. The A-Star 32U4 Minis have an on-board 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 A-Star,
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 L) 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.

The uploading-before-bootloader method (Arduino 1.0.x only)

The goal of the uploading-before-bootloader method is to select a non-existent serial port in the Arduino IDE and
then make sure the Arduino IDE enters the uploading phase before the microcontroller goes into bootloader mode.
This method does not work on the Arduino IDE 1.5.6-r2 and later because those versions of the IDE give a fatal error
message if the selected serial port is not present at the beginning of the uploading phase (e.g. “Board at COM7 is not
available.”).

1. Connect the A-Star to your computer via USB.

2. In the “Tools” menu, open the “Board” sub-menu, and select “Pololu A-Star 32U4”.

3. In the “Tools” menu, open the “Port” sub-menu, and check to see if any ports are selected. If the “Port” menu
is grayed out or no ports in it are selected, that is good, and you can skip to step 6.

4. Reset the board twice to get the board into bootloader mode. While the board is in bootloader mode, quickly
select the new serial port that corresponds to the bootloader in the “Port” menu.

Pololu A-Star 32U4 User’s Guide

© 2001–2014 Pololu Corporation

8. Reviving an unresponsive A-Star

Page 27 of 30

Advertising