2025-12-01 12:50 PM - edited 2025-12-02 8:08 AM
Hi all,
I am on the lookout for an STM32 microcontroller for a USB Device design where the order of USB D+ and D- pins can be "reversed". What I mean by this is that in most ST MCUs I have reviewed the USB pins are arranged so that D+ is above, and D- below it, as exemplified by the following screenshot from CubeMX and a random MCU:
This arrangement makes perfect sense e.g. for SMT USB Micro-B Female connectors as the pin arrangement of such components often nicely aligns with this order.
However, what I want to do is use an SMT USB-A Male connector on a PCB board, such as in this run-the-mill USB Flash Memory example form Kingston:
When a male connector is used, the pins of the connector are often aligned so that I would have to "cross" the wires in order to match the arrangement that ST MCUs expect.
I am aware that I could place the MCU on the bottom side of the PCB and the USB connector to the top side but I specifically do not want to do this, mainly due to the PCB-A supplier I am working with. They charge an arm, leg and your both daughters when you attempt to use two-sided placement.
Thus, I would like to know if there are any ST MCU choices where the pin order is in reverse, like exemplified by the following hand-crafted example:
Has anyone ever wrestled with a similar problem? If yes, which MCU did you end up using? My preference would be something small like 32 pins or less.
Solved! Go to Solution.
2025-12-02 9:15 AM - edited 2025-12-02 9:16 AM
What you have routed will work. Cross-talk and interference isn't a consideration for a trace under 1 inch with a speed of 12 MHz.
But here is how you can route it without vias Rotating U1 clockwise by 90 degrees shortens traces a bit.
You could also choose a USB connector that is upside down compared to the one you are using, or place it on the other side.
Lots of options to choose from here. All of them work. Don't get caught up on the small stuff.
2025-12-01 1:19 PM
Hi,
>When a male connector is used, the pins of the connector are often aligned so that I would have to "cross"
I never got this "problem" .
If the send or receive part is connected right, d+ and d- , no matter if you change from host to device :
"cross" is never needed.
So give real example ,with pics : a device, that needs to "cross" usb data line to work.
+
afaik no cpu has the feature: cross d+/- , for correcting wrong design .
2025-12-01 3:09 PM
To avoid crossing traces with a via? On an LQFP package, you can wrap one signal between pins to avoid this. Using vias will not pose any issues.
Don't think any chips can swap pins here.
2025-12-02 2:07 AM
Hi @ankes
STM32N6570-DK supports USB Host with type A connector.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2025-12-02 8:08 AM
Here is probably the most simplest example I can give, straight up from KiCad 9, using STM32C071F8Px and 48037-2200 USB-A male connector from Molex. The design and layout are obviously incomplete, missing just about every critical part, and no impedance matching, via size rules or anything, but it does exemplify the problem: the wires are "crossed" and the design looks plain ugly.
The pin order (1-4) VBUS, D-, D+, GND is, at least to my knowledge, quite standard among various manufacturers of these connectors. If you know of a manufacturer who deviates from this then please let me know.
The trace length difference is about 0,7mm so it might still work just fine for USB 2.0 FS. As per @TDK vias should not present a problem either. I tried routing in-between but there just isn't enough space. Not to mention crosstalk or other interference issues.
However, I'm still hoping that I can achieve a clean design, somehow. Using additional components such as an ESD-chip that is "crossed" internally is a completely viable option.
Also, @FBL this is a USB Device design. Sorry for missing that originally; I've updated the opening post accordingly.
2025-12-02 9:15 AM - edited 2025-12-02 9:16 AM
What you have routed will work. Cross-talk and interference isn't a consideration for a trace under 1 inch with a speed of 12 MHz.
But here is how you can route it without vias Rotating U1 clockwise by 90 degrees shortens traces a bit.
You could also choose a USB connector that is upside down compared to the one you are using, or place it on the other side.
Lots of options to choose from here. All of them work. Don't get caught up on the small stuff.
2025-12-02 9:58 AM - edited 2025-12-02 9:58 AM