USB configuration for STM32F4

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
joaquin
Posts: 49
Joined: Sat Jan 22, 2011 8:44 pm
Has thanked: 1 time
Been thanked: 3 times

USB configuration for STM32F4

Post by joaquin »

I have a new board from OpenPilot that uses as STM32F4 as in the STM32F4 Discovery. There are not schematics for this board although there are source code for a complex UAV. I have used this last board as the base board in Chibios, and the test code. I am having trouble with USB, because there are no enumeration request from the computer. After two days testing I am almost giving up.

Does anybody know if there are some specific configuration for USB in this CPU that depends on the specific board?

Thanks a lot
User avatar
toxygen
Posts: 24
Joined: Tue Mar 13, 2012 9:54 pm

Re: USB configuration for STM32F4

Post by toxygen »

Did you try example from testhal/STM32F4xx/USB_CDC?
joaquin
Posts: 49
Joined: Sat Jan 22, 2011 8:44 pm
Has thanked: 1 time
Been thanked: 3 times

Re: USB configuration for STM32F4

Post by joaquin »

Yes, that is the example case I have tried, once I removed all code relating to the sensors of the STM32F4Discovery board. I am able to switch leds, and debug to the point to find that the USB driver is waiting for the enumeration. Sniffing the USB communication there are no messages when I plug the USB.
With the original firmware from OpenPilot, the Board was detected and worked, although in HID mode, and with the Discovery board the example run perfectly. I don't have experience with USB, so I was wondering if have to identify some GPIO besides the standard used for USB.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: USB configuration for STM32F4

Post by Giovanni »

Hard to tell without schematic, it is possible you have to manipulate some GPIO in order to enable the USB or something like that.

Giovanni
joaquin
Posts: 49
Joined: Sat Jan 22, 2011 8:44 pm
Has thanked: 1 time
Been thanked: 3 times

Re: USB configuration for STM32F4

Post by joaquin »

I will have to analize in detail the original code to find out that activativation GPIO. It is complex and it uses other RTOS, but seems I don't have other choice.
Thanks a lot,
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: USB configuration for STM32F4

Post by Tectu »

PM the OpenPilot guys - they will give you the schematics. They don't release it to the public so early because they say that they need to be sure that everything works okay. It was the same with the OpenPilot that used the STM32F103.
From my experience you don't have to enable the power for the USB. That circuit would only take up space and waste energy (yes, just a tiny bit). It was the same with the OpenPilot with the STM32F103 again.


~ Tectu
Post Reply