Page 1 of 1

USB-CDC for STM32F407

Posted: Sun Dec 16, 2018 5:27 pm
by arbulgazar
I am new to Chibi and am trying to get the usb communication with my board STM32F407Discovery.
I've adapted the following demo for this board: ChibiOS_18.2.1/testhal/STM32/STM32F4xx/USB_CDC_IAD
By changing the include in Makefile from OLIMEX_STM32_E407 to ST_STM32F4_DISCOVERY and changing STM32_PLLM_VALUE to 8.

My device is not appearing as a serial port though. dmesg shows no cdc_acm devices. I am lost already, can someone point me in the right direction to get this working?
Also, when investigating usbcfg.c I noticed that both serusbcfg1 and serusbcfg2 refer to the same USBD2. Is that how it's supposed to be?

Re: USB-CDC for STM32F407

Posted: Sun Dec 16, 2018 5:51 pm
by Giovanni
Hi,

On the discovery the USB port is USBD1, see the demo under /home/giovanni/Projects/ChibiStudio/chibios_trunk/testhal/STM32/multi/USB_CDC, it supports your board. I am not sure USBD1 has enough endpoints for IAD, you need to verify.

Both point to USBD2 because both virtual ports use the same peripheral.

Moving to the STM32 support forum, this kind of topics belong there.

Giovanni

Re: USB-CDC for STM32F407

Posted: Sun Dec 16, 2018 5:57 pm
by arbulgazar
Thank you very much! That worked! Will start my project from here then.