cancel
Showing results for 
Search instead for 
Did you mean: 

MCU choices with "reversable" USB pins

ankes
Associate III

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:

ankes_0-1764621373987.png

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:

ankes_2-1764621580759.png

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:

ankes_1-1764621487915.png

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.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Super User

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.

TDK_0-1764695644193.png

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.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

6 REPLIES 6
AScha.3
Super User

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 .

If you feel a post has answered your question, please click "Accept as Solution".
TDK
Super User

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.

TDK_0-1764630433189.png

 

Don't think any chips can swap pins here.

If you feel a post has answered your question, please click "Accept as Solution".
FBL
ST Employee

Hi @ankes 

STM32N6570-DK supports USB Host with type A connector.

FBL_0-1764669995162.png

 

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.


@AScha.3,

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.

ankes_0-1764690826062.png

ankes_1-1764691174925.png

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.

TDK
Super User

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.

TDK_0-1764695644193.png

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.

If you feel a post has answered your question, please click "Accept as Solution".
ankes
Associate III

@TDK 

Indeed. Now I do feel like a dolt. Sometimes it is just so hard to see the obvious answer...

ankes_0-1764698292207.png