cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476 USB inconsistencies.

shingadaddy
Senior
Posted on March 29, 2017 at 00:21

I've been working with USB on my Nucleo board(S)  for some time now. Been comfortably successful at getting a few operational interfaces working with it. Including DFU. STM32L476. So time to make our own PCBS! We knocked out an order for 10 . Production needing 7 and having a few SPARES to help wear off the new. Ran into a little problem and I turned in an online help request. Waited all day and thought maybe someone there might notice I marked it Critical. Not sure of the turnaround time but everybody's critical  might be a little different. Hope I hear and in the mean time here's where I got too.

We have 10 Brand new (Identical) PCB's with STM32L476VG's on them.

They use the direct connected USB for communication. (PA11/PA12)

They are *all* loaded with the same binary, VIA DFU.

DFU works. Dependably.

The binary is the STM32CubleL4 HAL DEMO from EVAL board, with IO EXPANDER commented out. This runs the LEDS on EVAL and is the only thing needed to be removed for this to work. I figure it works good as a TEST LOAD.

Operationally :

  7 Enumerate/seem to work.  ------  3 DO NOT even enumerate correctly.

Do not meaning: 2 -  with DEVICE NOT RECOGNIZED responses.  1 -  PC IGNORING COMPLETELY

I use VBUS DETECT. USB 5VDC is getting to PA9 on the one the is completely ignored.  

We have matched lines on the USB traces about .7 inches between the type C USB connector and the MICRO. Connectivity is direct via usb line suppressors (TI_SN65220DBVR). No inline resistors. No Pull up on D+.I am going to gather these up personally and look into it. But this is being tested by very capable individuals with years of experience and there does not seem to be a difference in the PCBS PHYSICALLY or SIGNAL WISE. The code that is running on them is the STM32CubeL4 USB in DEVICE MODE -CDC DEMO from the EVAL project in TrueStudio.

My immediate questions would be.

1. Suggestions such as the 'Oh yeah' type, as to what might be wrong?.

2. Since DFU mode works, (and 7 others) shouldn't the enumeration at least be functional on the operational testing?

3. Does DFU USE a different SPEED that is not as critical as USB FS.

4. Does the MSI trimmed with LSE, really provide precision/stability good enough for USB FS?

Crystal = Abracon ABS25-32.768KHZ-T

This is our first 10 in a production run and we are now a little nervous on the 70% operational aspect.

Power = CLEAN

OSC/Clock CLEAN

FDMOD set so FORCED DEVICE MODE is true.

Ground plane internally.

I had one nucleo dev board (Out of 5 or 6) that I used for a while until it acted like it had a heat sensitivity problem after some operational time. Then DEVICE NOT RECOGNIZED. On more than one computer. Unless I left it unplugged for about 30 minutes. Then BACK IN BUSINESS !   THAT is flakiness at its finest. And now I think - maybe we have more?

Just thought I'd drop this here too and see if anyone had any ideas. I really didn't think I had to get the LED out and chase it though the code (again) But here I am. Not amused at all.

Any input appreciated.

Thanks folks.

65 REPLIES 65
Posted on August 25, 2017 at 17:58

Hi shingadaddy!

I am very thanksful for your hardwork and most thanks to Jan and ST who contribute to this solution. Great!

Posted on August 25, 2017 at 18:26

Hi Amel,

Thanks a lot for your contribution here. For two hours I have been reading all the steps which lead to this solution. I am a beginner and since one week I tried to fix this problem by my side. Throught this discussion I learned 10 more time as what I learned in the Datasheet and Application notes on ST during the last 7 days. Like shingadaddy I have a Nucleo L476RG which is actually  running the example mentioned above. But as you may have noticed, it did not work until here. I am going to fix the discoverd mistake tomorrow. However I want to work on projects where I have to make all needed configuration via CubeMx, for this reason I would thank you a lot for posting here images stepping the whole configuration on CubeMx to generate a project like  The EVAL board CDC example in STM32CubeL4 but with my L476RG-core. I can set up the OTG FS as device only and the corresponded HID class, but I do not know whenever I must also set up the LSE Cristal in RCC or make further Hardware configurations so as to get a working project I make myself from the beginning. This will help me a lot for the following projects. Additionally, I would also have a schematic showing how to connect the USB-B dongle to the CN10-pins so I could check my onw circuitry.  My English is not good but I hope your understand what I write as well. Thank you in advance for your reply.

SS

Posted on August 25, 2017 at 18:29

I will be also too clad to have some images showing how you have mounted the USB-B dongle on the CN10 on your Nucleo L476RG. Thanks a lot in advance.

SS

Posted on December 19, 2017 at 22:16

0690X00000609DJQAY.png
JHinc
Associate II

Thank everyone for the help so far. I am able to talk to the LCD, using The BSP example. Too bad there is no easy way to copy the example without messing up the original example. John

Oops, this wound up in the wrong spot. Very sorry.