Page 1 of 1

USB_CDC example on STM32F4DISCOVERY board

Posted: Wed Nov 14, 2012 11:16 am
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

Re: USB_CDC example on STM32F4DISCOVERY board

Posted: Wed Nov 14, 2012 11:26 am
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

Re: USB_CDC example on STM32F4DISCOVERY board

Posted: Wed Nov 14, 2012 12:39 pm
by Markus Gritsch
Yes, this project works fine. Thanks for the hint.