AnsweredAssumed Answered

HAL or SPL for USB

Question asked by shingadaddy on Nov 28, 2016
Latest reply on Dec 7, 2016 by shingadaddy

First of all I suspect someone somewhere has an L476 running the USB peripheral using HAL. Maybe?

From the HAL libraries -

I've got several aspects of peripheral running on my Nucleo-L476RG development board.
I/O, Uart, Uart IrDA modes, Encoders. A/D's...etc.. 

So I figured I had a fairly decent handle on the basics of what it took to get things going
MSI comes up first at 4MHZ

Set up clock sources/frequencies until they are how you need them
Enable the clock sources to the buses/peripherals as you need them
Configure the pins how you need them (In/Out/ALTF/ADDF)
Make any peripheral initializations and you are good to go. Usually.

Using TrueStudio 6 and the the HAL 1.6 (Black Friday updated) version of the EVAL\Project\Application\USB_Device\CDC_Standalone pretty much has me fried.

I have a Nucleo board which does NOT have any USB example stuff for it. The EVAL board however DOES have it - code folders/path listed above.

1. The nucleo board only has 1 LED (PA5) and 1 SWITCH (PC13) to worry about,
2. and since the EVAL project mentioned above has no conflict with either of those pins as is
3. and the above mentioned EVAL project doesn't seem to have any pins configured in that project that would cause heartburn to the Nulceo board hardware,

A code portover would seem a near no brainer to get running on a Nucleo using this Eval project.
After all, the CDC project doesn't seem to ENGAGE any I/O that would cause the magic smoke to exit the STM32L476RG and its present wired state on the Nucleo board.
So compile it up -
Drop it on the board

Wire DP to PA12
Wire DM to PA11
Wire VBus (+5V_usb) from host to PA9 (Code apparently has VBUS SENSE enabled.
They seem to have the ID pin (PA10 for OTG functioality as I understand it) configure. WHY I don't know
in a DEVICE MODE setting.

They have some LED inits that I have commented out.

I'm going to look at it again, around the "ID" thing and maybe something that tells it it's a 476 build.

Other than that - I get NOTHING when it gets plugged into a PC usb host hole. (Yes the hole works fine for OTHER stuff)

And I've got NOTHJING after LOTS of tinkering.

I've submitted to ST for help. So far only the AUTO REPLY kind of help

I fear I'm having a forest for the trees thing going on.
AM I off track obviously (Other than the first line maybe s/b "From the SPL Libraries....  "