Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

A-Star 32U4 serial port not recognized

Hi,

I have an A-Star 32U4 Robot Controller LV with Raspberry Pi Bridge. It was working correctly, but then I uploaded a sketch that I wrote and now my Windows 10 laptop doesn’t recognize the 32U4 when I attach it to USB port.

I have tried all revival methods as suggested on your product pages without any success (uploading-before-bootloader, bootloader-before-uploading and Reviving using AVRDUDE). My laptop still doesn’t see the 32U4 as a serial port.

32U4 can enter the bootloader mode and the yellow LED start flashing, but I can’t upload a sketch.

I have tried uninstalling the 32U4 drivers and then re-installing them again, rebooting the laptop, connecting the 32U4 to another laptop - no success.

In my sketch I have a "while (1) { … } " inside loop() function. Is this causing the problem?

Any suggestions how to bring the 32U4 back to life?

I’m using Arduino 1.8.8 on Windows 10.

Here is output from Arduino IDE with 32U4 connected to USB port (in Arduino IDE the menu item for selecting the USB port is grayed out):

Sketch uses 9258 bytes (32%) of program storage space. Maximum is 28672 bytes.
Global variables use 551 bytes (21%) of dynamic memory, leaving 2009 bytes for local variables. Maximum is 2560 bytes.
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
PORTS {} / {} => {}
Couldn’t find a Board on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board’s reset button after initiating the upload.

AStarRPiSlaveEncoders.ino (6.9 KB)

Hello.

I am sorry to hear that you are having trouble with your A-Star 32U4 Robot Controller LV with Raspberry Pi Bridge.

Putting an infinite loop inside the loop function should not be a problem, but it is possible that some other part of your code is interfering with the USB interface of the ATmega32U4.

When you tried the “uploading-before-bootloader” method (documented in the “Reviving using the Arduino IDE” section of the user’s guide), what was the first step of that procedure that did not work for you? Could you tell me more about what happened on that step, and the steps before it? Is the robot controller connected directly to the computer or connected through a USB hub?

If you have not done so already, I recommend disconnecting all other electronics from your robot controller. I also recommend checking that your USB cable and the USB port on your computer are working. The best way to do this is to use the same USB cable and the same USB port to transfer data to or from a different USB device. Some USB cables only have power wires and cannot be used to transfer data.

–David

Hi David,

I went through all the steps of “uploading-before-bootloader”, including step 7. 32U4 goes into the bootloader mode, yellow LED starts flashing and I start the download of the sketch in Arduino IDE. After some time there is a beep on 32U4 and the LED stops flashing. But Arduino IDE did not manage to find the 32U4 serial port and the sketch did not download. All the time I see this message repeating over and over in IDE until the download attempt times out:

PORTS {} / {} => {}

I disconnected all other electronics from 32U4. The USB cable is the same that I’ve used before to successfully program the 32U4, the same goes for the laptop and USB port. I have checked and I can successfully program a different Arduino board with that USB cable and port.

Your description of what happens on step 7 makes it sound like the computer is not recognizing the A-Star 32U4 Bootloader. However, if you did step 4 of the uploading-before-bootloader method successfully, the computer would have recognized the bootloader at that point. Step 4 involves putting the A-Star 32U4 into bootloader mode temporarily, and then selecting the new port that corresponds to the bootloader. What port did you select when you did that step? When the A-Star 32U4 is connected, but not in bootloader mode, what ports are listed in the Ports menu of the Arduino IDE? If you get it into bootloader mode, see yellow LED fading in and out, and then quickly open the Ports menu, what ports do you see then?

Also, while the A-Star 32U4 is in bootloader mode, do you see any entries for it in the Device Manager? It would be good to view devices by connection (as you did in your previous screenshot) and fully expand all of the devices belonging to each USB host controller.

–David

I didn’t select any port at step 4 as “Port” menu entry in Arduino IDE is grayed out.

When 32U4 is connected, but not in bootloader mode, the “Port” menu entry in Arduino IDE is grayed out. Situation is the same with 32U4 in bootloader mode (yellow led fading in/out) - menu entry is grayed out.

I’m attaching the screenshot of fully expanded Device Manager with 32U4 in bootloader mode.
image

I’ve attached the problematic sketch in my original post. Could you try uploading the sketch to 32U4 and see if you can reproduce the problem? (sketch requires PinChangeInterrupt library, I’m using revision 1.2.6).

It sounds like you are able to start the A-Star 32U4 Bootloader, but not able to get your computer to recognize it via USB.

I would be happy to try your sketch, but I do not see any attachments to your forum post. Can you try again? Could you also click “Verify” in the Arduino IDE to compile the sketch, and then send me the resulting *.ino.hex file?

–David

Great if you can try my sketch, please find attached the sketch as well as the hex files.AStarRPiSlaveEncoders.ino (7 KB) AStarRPiSlaveEncoders.ino.arduino_leonardo.hex (25.4 KB) AStarRPiSlaveEncoders.ino.with_bootloader.arduino_leonardo.hex (49.7 KB)

I compiled your sketch from source and loaded it onto a robot controller here. I also loaded your HEX file (the one without the bootloader). All of this worked, and the board’s bootloader is still recognized via USB, and it can still be programmed normally.

It is unlikely for a sketch to be able to permanently disable the bootloader on our A-Star 32U4 products: the bootloader is write-protected, and if you double-press the reset button then the board goes into bootloader mode before the sketch has a chance to execute any code.

If you have not done so already, could you try disconnecting any extra electronics from the board and seeing if that makes it work? Is there any sign of physical damage inside the board’s USB connector or around it?

–David

The first thing that I did was to disconnect all the electronics, but it didn’t help - the 32U4 is not recognized by the laptop as a serial port.

I don’t see any damage, neither in/around the USB connector nor elsewhere on the board.

I can hear a beep when I connect the 32U4 board to the USB cable and the green light goes on.

Unfortunately, it sounds like the USB connection of your A-Star 32U4 Robot Controller LV has been damaged, and it is unlikely that we will be able to repair it. If you email us directly at support@pololu.com with your order information and a reference to this thread, we can see what we can do to help you out.

–David

OK, thanks for all the time and effort you put into this. I’ll get in touch with your support team directly by email.