geekhack
geekhack Projects => Making Stuff Together! => Topic started by: Kageni on Tue, 09 March 2021, 21:17:21
-
Hey guys I built a pcb with an atmega32u4-MUR hooked up to a USBC daughter card connected by a 4 pin connector. When I got them in the mail, and hooked them up, it isnt recognized by my computer or by QMK toolbox. USB device viewer shows nothing connected, or it shows "open pipe" "failed device enumeration". No DFU detected on QMK toolbox. The MCU is showing 5V on VCC, and I havent found any shorts. I did notice that one of the two 5.1k resistors on the usbC CC ports shows a resistance of 1.1k when its plugged in, but 5.1k when it isnt plugged in; While the other shows 5.1k on both.
https://github.com/Kageni-wq/Keeber
-
i may be wrong, but as far as i know... chips form manufacturers (used in pcb manufacturing) do not have any programming on them, including the bootloader.
as far as the resistor, not sure what the tolerances are for usb. you could swap it out or replace both and have a word with the manufacturer.
-
As Nevin said, it has no bootloader.
If you have an Arduino or Pi around you can jerry-rig that into a tool to load a bootloader and from there you can then load QMK.
-
ATmega32U4-AU(TQFP44 package) has pre-programmed bootloader. But ATmega32U4-MU(QFN44 package) does not.
See ordering information of the datasheet.
-
serial programmer right?
-
I think I found the problem, the crystal footprint was wrong for some reason. So it has the two connections for the capacitors next to eachother on pads 1 and 2, while the crystal itself has these pads on opposite pads.
-
you'll still probably have the issue with the controller (no bootloader)
-
Is there any 16MhZ crystals that have the pad order like that, so I can try resolder them and not have 5 useless pcbs :(
-
There must be or someone wouldn't have made the footprint - does the name in the software help?
If not you could cut the trace(s) and solder jumper wire(s) to the capacitors, not pretty but still close enough it should work.
-
Unfortunately not to my knowledge.
You can find variants with pins 2-4 as GND or 1-3 as GND (important to check also in order not to have a useless PCB), seen none as 1-2 or 3-4 as GND.
As for the QFN version not having a DFU bootloader, I tought it had one and designed a PCB without ISP header.
Still not tested it yet, I'll give you my result once I'll be able to do the check.
-
My guess is that there is a mismatch between the symbol used and the footprint used, so the designators will be wrong and it will be incompatible with the intended component/part. I do not know of any crystal with that footprint and pinout. You can probably find a 2-pin crystal that can fit on the two top pads.
I'd cut traces and solder jumper-wires. You should be able to get it working. Proper prototypes should have a few jumper-wires anyway :D
Both the common LQFP and QFN 32U4 ships with DFU-bootloader, the one without booloader is called ATmega32U4RC
-
The cut traces + jumper wire should do the trick.
Also FYA just took the time to check my own designed PCB that uses the same QFN chip.
And ... it is properly recognized in the device manager and in QMK toolbox :)
As said earlier, and just confirmed by me, QFN variant also has a DFU bootloader pre-flashed.
Pfff, so relieved not to redo my design again :D
So probably in your case the only thing to fix is the wiring of the crystal ;)
-
Good to know. Thanks
-
Thanks for the info, who doesnt love a little extra soldered wires on their pcb anyways :thumb:
-
it really ain't worth it unless it's not perfect. gotta have some personal touch/character.
-
Well I cut the connections and spliced wires to get the correct wiring for the crystal and still nothing :(. Interestingly, Windows played the device connected sound when I shorted the USB date line and Vbus on the 4pin connector when I was testing for voltage. Any other ideas?
-
Does it still show up as "failed device enumeration"? I'd start by double checking that the pinout on your 4pin cable is correct (mostly that d+ and d- is not swapped)
-
It doesn't show up at all, I downloaded the windows developor tools and using the usb device viewer usbview.exe, it shows nothing connected. I feel that when it briefly said device enumeration fail it was because I had shorted jumped one of the usb data lines to vbus when checking for voltage.
I am using https://lcsc.com/product-detail/Diodes-ESD_RUILON-Shenzhen-Ruilongyuan-Elec-RLST236A054LV_C20892.html for ESD protection on the USB daughter card, and running D-/D+ through it. Looking at the data sheet https://lcsc.com/product-detail/Diodes-ESD_RUILON-Shenzhen-Ruilongyuan-Elec-RLST236A054LV_C20892.html, it seems that stand off voltage for this device is 5V but I am reading 5.3V on VBUS. Could that be the problem? Both D+ and D- are showing 0 volts.
The only other thing I found that is weird is that R2, one of the CC 5.1k resistors shows 39.75 MOhms of resistance across it when plugged in, but 5.1k when unplugged. R1, the other CC 5.1k resistor is showing 5.1k whether usb is plugged in or not.
-
if you flip the usb connector/cable, I believe the other CC-resistor will show a changed resistance. I do think this is perfectly fine and part of the orientation detection. I'd recommend not to measure stuff like that when the device is powered.
Can you post a schematic of how the ESD-protection is connected on the daughter board? The chip should sit in parallel, the usb-signal should not go through it, could that be the issue?
-
I attached both schematics. That makes sense for detecting orientation. Should there be voltage on the USb data lines?
The crystal is getting 0.834V so I feel like the MCU is functioning, just not communicating
-
While I was measuring voltage on the crystal it played the usb connected noise and displayed this message. I couldn't replicate it however after unplugging and trying again, even after measuring voltage on crystal again.
-
if playing around the crystal made it try to communicate, are you sure you do not have a bad solder join on one pin/capacitors? without a precise clock i do not think the controller can keep the usb timings, and so would fail to communicate, if one of the leg of the crystal was floating i do not think it would work properly and i dunno how the atmega32u react to that.
that would be my current guess as to what could be going wrong there. but then i am only a beginner when it comes to circuit design and only ever used PIC and pro micros.
-
Voltage levels is not a good indicator of working crystal, not sure about voltage levels on USB, but d+ or d- should be 3.3v iirc, to indicate which speed is used, but it's a differential signal between d+ and d-, so measuring voltage level is not a good indicator here either imo. I'd measure continuity/resistance between cable on daughter board (or connector) to 22 ohm resistors or legs on the MCU
Implementation of ESD-protection on daughter board should work.
yuis advice to check the crystal is good, could you share a pic of how you cut traces and added jumper-wires?
-
I cut using a scalpel until their wasnt continuity. I tried it again on another pcb to see if it was bad connections were the culprit. I then tried cutting the connections to both crystal pads and reconnected them using wires of the same length to see if that would help, to no avail.
-
The two pads on the crystal are connected together but are they connected to ground?
-
Not directly, they are connected to ground through the two capacitors only
-
It looks like you have mirrored how the crystal pinout is.
https://www5.epsondevice.com/en/products/crystal_unit/img/tsx3225_dimension.gif
[attach=1]
You can also skip attaching GND on the crystal, it is not needed, just make sure the crystal caps are grounded.
Suggestion:
[attach=2]
-
Nice catch!! Thanks so much for all your help guys
-
Yay!
This is ugly as **** but it does the job :D
Well done!