AnsweredAssumed Answered

How should I config GPIO pins for USB Host mode, if needed at all?

Question asked by cuneo.john on May 25, 2014
Latest reply on May 28, 2014 by sung.chen_chung
I'm using F105RBT6. I'm not sure if I'm getting this right but it looks to me that I have to configure PA11, PA12 (I use host mode only so PA9 and PA10 probably isn't needed but correct me if I'm wrong) tp AF mode in order to use the USB host function.

Then this is where it gets really really confusing, as always, thanks to ST's dare I say nightmarish ambiguous tech docs: I don't know exactly what mode should I use when initializing those 2 pins. GPIO_Mode_AF_PP? GPIO_Mode_AF_OD?

I'm going with GPIO_Mode_AF_PP but it doesn't work.

To make the matter worse, when I referred to the F105 CL manual, I found that, when configured to AF, all these modes are available:

So, which one am I using here exactly? I'm so confused. Does it mean if I configured it to AF, the MCU automatically detects which mode  I'm using? Out of all those FOUR modes?

Or is it the fact that since it's F105 CL series, my conventional F103 series wisdom no longer applies, and I have to use a whole new set of functions to enable OTG_FS_DM?

To sum it up: I want to configure PA11, PA12 as USB DM and DP in Host mode, what should I do?

Do I just use
GPIO_Init function
and chose
GPIO_Mode_AF_PP mode

or do I have to use a whole different function, NOT EVEN LISTED in UM0427?

Any help would be greatly appreciated, thanks in advance.