USB_CDC example on STM32F4DISCOVERY board

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
Markus Gritsch
Posts: 2
Joined: Wed Nov 14, 2012 8:35 am

USB_CDC example on STM32F4DISCOVERY board

Post by Markus Gritsch »

Hi,

I am trying to get the ChibiOS_2.5.0\testhal\STM32F4xx\USB_CDC example running on a STM32F4DISCOVERY board.

* I changed in the Makefile
include $(CHIBIOS)/boards/OLIMEX_STM32_E407/board.mk
to
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk

* I changed in mcuconf.h
#define STM32_PLLM_VALUE 12
to
#define STM32_PLLM_VALUE 8
(as seen in this [1] project discussed here [2] and here [3])

* And finally commented out the palClearPad() and palSetPad() lines in Thread1() because of GPIOC_LED being undeclared.

The project compiles now, but after flashing it to the STM32F4DISCOVERY board, and connecting the OTG USB connector to the host, it does not enumerate.

And hints on what else has to be changed would be appreciated.

Thanks,
Markus

[1] https://github.com/Mathias-L/STM32F4-Di ... ample-code
[2] viewtopic.php?f=4&t=514
[3] viewtopic.php?f=4&t=523
Last edited by Markus Gritsch on Wed Nov 14, 2012 12:48 pm, edited 1 time in total.
Abhishek
Posts: 266
Joined: Wed May 23, 2012 3:15 pm

Re: USB_CDC example on STM32F4DISCOVERY board

Post by Abhishek »

Hello Markus,

In the latest dev version of ChibiOS - v2.5.0 and the trunk, there is one project ARMCM4-STM32F407-DISCOVERY-MEMS that uses the USB CDC driver on the F4 discovery. It is working for me.

Maybe you could try using that and see if it works.

Best Regrards
Abhishek
Markus Gritsch
Posts: 2
Joined: Wed Nov 14, 2012 8:35 am

Re: USB_CDC example on STM32F4DISCOVERY board

Post by Markus Gritsch »

Yes, this project works fine. Thanks for the hint.
Post Reply