Sparkfun not recognized after hex upload

Hi everyone,

I've installed and put to run nicely an Sparkfun board in order to emulate a gaming periferic.

After being running for hours, the next day I've noticed the Sparkfun was not being detected by the USB port. I've tried 3 different cales an another computer with same result.

If I upload one of the basic sketchs from Arduino IDE, the board shows again in the device manager.

As I go to the Arduino_builder and I load the emulator FW (atmega32u4.hex) it disappears.

Any suggestions, please?

Thanks in advance.

Hi @riky_sim.

Was it detected before it ran for those hours?

Please provide a more detailed description of what you mean by this. Are you referring specifically to the board producing a serial port?

Depending on the program you are running on the board, this might be normal and expected. It is likely that the emulation doesn't require a serial port at all (just as you would not expect a serial port to appear on your computer after connecting a gaming joystick).

Which board?

This can be caused by a bug in your code.

Can you provide the steps that you took to perform that upload after the board is no longer detected? What happens after you reset the board; is it recognised again?

Hi @ptillisch and @sterretje , thanks for answering.

From the very begining the board was detected as a serial port as an arduino Leonardo.

If you make a reset of the board you load the bootloader, then it appears as serial (Arduino Leonardo bootloader COM XX), but it is only active by 8 seconds.
when the bootloader is off then the device it self is not recognized as a serial port.

During these 8sec the bootloador is active, I've managed to upload quikly a basic sketch (Blink) from Arduino IDE. Once done, the board appears as an Sparkfun pro micro at serial port list.

Then I tried to upload the hex as I did in the very first day with the Arduino builder. the .hex looks sucessfully uploaded and after that the board is not longer recognized as a serial port...

When you upload a (normal) sketch to a board with native USB (like your Pro Micro), it contains two parts

  1. The sketch that you wrote
  2. USB functionality
    → board identification
    → reaction on software reset (opening and closing the serial port with a baudrate of 1200 baud)

If you upload a HEX from an unknown source, the second part might be missing. As a result, your board will disappear after the upload; this is what @ptillisch tried to explain.

Where does this hex file come from? I know that you say "As I go to the Arduino_builder and I load the emulator FW (atmega32u4.hex)" but I do not understand what it means. There is a tool called arduino builder but that does not create a hex file, maybe that is where my confusion comes from. I did scan my installation directories for a file called atmega32u4.hex and could not find it (I have both the Arduino AVR board package and the Sparkfun AVR board package installed.

  1. Is it from a sketch that you created? If so, did you have to install a specific board package for it?
  2. Or did you download the hex from somewhere.

Hi @sterretje ,

Sorry that I'm a comolete rookie and maybe I'm not explaining my self as good as I wish.

The .hex is downloaded from a creator webside that releses this emulators.
This is the process I'm following to upload this .hex (as you see, this guy has the boa:

The firmwares to emulate ich device is are in this Github page:

Wiki about the whol picture for better underdtanding if you wish:
https://gimx.fr/wiki/index.php?title=Main_Page

Thanks a lot.

Hi mates,

Thank you for your help, I've finally solved the issue.

Finally, one of the cabes had a loose terminal and was doing on-off contact. :frowning:

Glad that you got it sorted. I'm however surprised about the cause.

I did dig a little through the source code for the G27 Racing Wheel and i could not find any reference in the product name to any Arduino. As far as I understand USB (I'm absolutely not a specialist), the below will show up (somewhere) in Windows device manager when you load the EMUG27.hex and connect the board.

const USB_Descriptor_String_t PROGMEM ProductString = {
        .Header = { .Size = USB_STRING_LEN(16), .Type = DTYPE_String },
        .UnicodeString = L"G27 Racing Wheel"
};

For a Leonardo, it looks like this (the first Unicode text will be used when you compile e.g. blink for a Leonardo).

const USB_Descriptor_String_t ProductString =
{
	.Header                 = {.Size = USB_STRING_LEN(16), .Type = DTYPE_String},

	#if DEVICE_PID == 0x0036
	.UnicodeString          = L"Arduino Leonardo" 
	#elif DEVICE_PID == 0x0037
	.UnicodeString			= L"Arduino Micro   "
	#elif DEVICE_PID == 0x003C
	.UnicodeString			= L"Arduino Esplora "
	#else
	.UnicodeString			= L"USB IO board    "
	#endif
};

So I unfortunately don't understand :cry:

hi @sterretje,

The complete setup is the Arduino conected wiht micro USB to the PC and the RX and TX terminals to an 2102 USB converter that also is conected to the PC to another USB port.

At the end, maybe the 2102 device is the only shown in the device manager.

Question is, do you now see "Arduino Leonardo" in the device manager when your HEX file is loaded? That is what your topic was all about as far as I understood it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.