Hi! I've bought Arduino Leonardo clone, and it was dead out of the box. PC and Mac wouldn't react to it connected at all, all it gave me - green ON led and yellow L led. I've tried to tinker with it, flashing bootloaders, resoldering and whatnot. For flashing I've used an UNO with the default ISP sketch, got errors about device signature, it was basically zeroes. But a strangest thing happened when in despair I tried to probe the Leonardo with multimeter. After I've probed the 1 mOhm resistor near the 32u4 chip, it showed signs of life - L led began to blink in random manner. After reset it began to blink in the Blink sketch manner. Whoa I thought, connected to PC and I've got the unknown device descriptor. So I've decided to try to burn the bootloader, got the same result. Thinking I've got nothing to lose I've burned the bootloader with -F parameter, which essentialy overrides the device signature check. It burned! Aaaaand still unknown device. Now it can be burned from Arduino IDE, no problems, but no matter what I burn it still can't be recognized by PC or Mac, which is kind of why I've bought it in the first place. Here is the avrdude log:
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "/Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex"
avrdude: input file /Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex auto detected as Intel Hex
avrdude: writing flash (32730 bytes):
Writing | ################################################## | 100% 38.43s
avrdude: 32730 bytes of flash written
avrdude: verifying flash memory against /Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: load data flash data from input file /Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex:
avrdude: input file /Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex auto detected as Intel Hex
avrdude: input file /Users/denys/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/bootloaders/caterina/Caterina-Leonardo.hex contains 32730 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 20.46s
avrdude: verifying ...
avrdude: 32730 bytes of flash verified
avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)
avrdude done. Thank you.
The hexes I've tried to burn are Caterina-Leonardo, Leonardo-prod-firmware-2012-04-26 and Leonardo-prod-firmware-2012-12-10. After burning bootloader, the L led fades in and out slowly 10-ish times, which I've seen on the forums indicates the problem with bootloader. Feels like I'm so close to get it working, but missing some essential step, and couldn't find any relevant info.
The fading LED indicates that the boot loader is active. It does that after a reset or when the IDE issues a reset by opening and closing the serial with a baud rate of 1200.
Make sure that your USB cable is a data/sync cable and not a charge-only cable. The latter of cone with e.g. power banks and Bluetooth speakers.
I'm absolutely positive it's a data cable. Actually two of those, I've double checked with Kindle, loaded couple of books. If it helps, Windows sees a corrupt device twice, when led is fading and when it switches to blinking. CH34x driver is fine, I have a Nano connected as well, it works great (tried disconnecting Nano as well)
Touching the 1MOhm resistor will affect the oscillator. Does your board now consistently switch between boot loader running and blink running without other interference?
One possible reason why Windows gives you an unknown device might be the clock frequency. Leonardos run on 16MHz; there is a small chance that the board manufacturer did put a 8MHz crystal / resonator on the board. To test that, you can install the SparkFun AVR board package (additional board url: https://raw.githubusercontent.com/sparkfun/Arduino_Boards/main/IDE_Board_Manager/package_sparkfun_index.json), select the Pro Micro 3.3V/8MHz and burn the bootloader.
The fact that you had to use the -F option when burning the boot loader is never (in my opinion) a good sign. It simply means that the processor could not be identified; that could be an ICSP wiring issue but in this case I think that it's more likely that the board manufacturer put a reject processor in there. If you burn the boot loader again, do you still have to use the -F option.
If windows allows you to dig into the properties of the board in device manager, what are the VID and PID of the board in windows device manager? They should be from the below list
The board does not use a serial-to-usb converter so the CH340 is not relevant; the processor itself handles the USB communication.
PS
My comment about the cable was possibly silly; blame it on lack of coffee. Windows would not give an "unknown device" if it was a charge-only cable. Sorry for that.
So, after I've touched the resistor the board worked absolutely consistently - reacts to reset, l fading then blinking. As far as -F stuff - I dodn't have to use it after the first burn. Like a perfectly functioning board that can't connect via usb.
Windows does allow me to dig into the device, however as descriptor failed, it doesn't show any IDs.
I've tried to burn the pro micro 8 mhz, went from fading-blinking to fading only, still failed descriptor. Also, there is 16 on the quartz thingy on the board, I guess knockoffs won't go that far in trying to fake.
Which made me thinking - could it be the board needs some another Leonardo bootloader? Loke I think I saw one from sparkfun, not sure if it's any different or could it help. If it could, could you please guide me what other manufacturers(?) I could get bootloaders from. I'd go one by one.
You would be surprised. There were recently two topics about, what looked like a CH340 (on an Uno) that identified itself as an FTDI adapter.
I doubt it; a Leonardo should use the Caterina bootloader (file Caterina-Leonardo.hex).
Adafruit has some 32U4 based boards (adafruit 32U4 - Google Search) with possibly slightly different boot loaders; you can try their boot loader. There is also the Teensy 2.0 (Teensy® 2.0) which might use a slightly different boot loader. Note that those boot loaders might not be 16MHz boot loaders.
I however doubt if it will solve your problems. It definitely sounds to me like a defective 32U4.
I think that the Pro Micro boot loader hex file does not include the blink sketch while the Leonardo one does; you can look at the difference of the size of the respective hex files.