USB on STM32F4

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
Post Reply
kpa
Posts: 3
Joined: Sun Mar 18, 2012 1:52 pm

USB on STM32F4

Post by kpa »

Hello,

I have seen that STM32F1 have a USB support in ChibiOS but not STM32F4.
Do you already have plan to add the USB support for F4 ? If yes do you already know when it will be done ?

Is it complicated to add this support myself ? If not could you point me where I have to add ?

Thanks in advance for your help

kpa
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB on STM32F4

Post by Giovanni »

Hi,

It is already being implemented, some work has already been committed on the repository, the "when" is TBD, it is a very complex peripheral.

Giovanni
efs113
Posts: 14
Joined: Mon Mar 19, 2012 3:51 pm

Re: USB on STM32F4

Post by efs113 »

Which subversion tree has the commits? I'd like to take a look at what has been done so far.

Eric
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB on STM32F4

Post by Giovanni »

Hi Eric,

It is in the trunk, so far there is an header with all register definitions, it is very large, this peripheral has a lot of registers.

Giovanni
efs113
Posts: 14
Joined: Mon Mar 19, 2012 3:51 pm

Re: USB on STM32F4

Post by efs113 »

I've been working with the 'full speed' registers for a while now using the example in the Discovery code as a starting point. I've had some success; the chip enumerates and starts talking on the bus, but I get strange results when I try to read the setup packet. Was hoping to get some hints from your code.

Eric
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB on STM32F4

Post by Giovanni »

Hi Eric,

I already worked on that peripheral on another ST product but that code is proprietary and I can't show it, I don't remember problems with setup packets however.

The peripheral was a bit different because it was configured with a single TX FIFO but this should not impact the problem you mentioned.

I will be able to comment on this after rewriting that code and actually testing it.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14895
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: USB on STM32F4

Post by Giovanni »

I found a possibly related discussion here.

Interesting.

Giovanni
efs113
Posts: 14
Joined: Mon Mar 19, 2012 3:51 pm

Re: USB on STM32F4

Post by efs113 »

Your search fu is better than mine ...

I'm seeing similar behavior. When I read the GRXSTSP register I see 0x01000680 which is an invalid status. It may be a timing issue. I'll take a look at their code and see if it gives me any hints.

Eric
Post Reply