USB-CDC for STM32F407 Topic is solved

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

Moderators: RoccoMarco, barthess

User avatar
arbulgazar
Posts: 8
Joined: Sun Dec 16, 2018 5:12 pm
Has thanked: 1 time

USB-CDC for STM32F407

Postby arbulgazar » Sun Dec 16, 2018 5:27 pm

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?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: USB-CDC for STM32F407  Topic is solved

Postby Giovanni » Sun Dec 16, 2018 5:51 pm

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

User avatar
arbulgazar
Posts: 8
Joined: Sun Dec 16, 2018 5:12 pm
Has thanked: 1 time

Re: USB-CDC for STM32F407

Postby arbulgazar » Sun Dec 16, 2018 5:57 pm

Thank you very much! That worked! Will start my project from here then.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 25 guests