cancel
Showing results for 
Search instead for 
Did you mean: 

Configure GPIOs PA11 and PA12 to USB D+ and D-

dimax
Senior
Posted on July 11, 2016 at 17:27

I'm working with STM32F070xB

I need to configure GPIOs PA11 and PA12 to USB D+ and D- alternate function. According to datasheet it is listed as Additional functions (not Alternate) USB_DM and USB_DP.

It is not clear how to configure these GPIO for USB functionality. If they are not Alternate functions so how can I reach desired functionality?

We are not using Standard Peripheral Library. I need explanation in terms of GPIO port registers.

Thanks.

4 REPLIES 4
Posted on July 11, 2016 at 19:59

I suspect that it has specialized pin-drivers that recognize and perform the USB connectivity, switching out the normal driver/af behaviour. Don't think you get to configure them. This is a user forum, use the online support or CALL your local ST office or FAE.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dimax
Senior
Posted on July 19, 2016 at 18:26

Got a reply from online support. You are right USB functionality takes over GPIO driver. 

Now I have another problem. For some reason I can't write endpoint registers EP0R for instance, while I do can write control registers like CNTR. I'm getting USB RESET interrupt and try to configure EP0 but for some reason writes to EP0R are inhibited. Do you know what can be a problem? Some clock is missing?

Mikexx
Associate II
Posted on August 02, 2016 at 03:35

Did you find out the reason for this? I can also write to various USB registers but not the endpoint registers EPnR etc.

Do you find the cause of your problem with EP0 inhibited problem?