STM32F105CB as USB Device not detected

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
User avatar
Spider
Posts: 25
Joined: Tue Nov 27, 2012 10:05 am
Location: Omsk, Russia
Been thanked: 1 time
Contact:

STM32F105CB as USB Device not detected

Postby Spider » Sun Sep 17, 2017 6:00 pm

Hello.

How to force host to enumerate my device?
I use my custom board where only D+ and D- connected to USB, no VBUS lines. D+ pulled up to VCC via 1,5kOm.
Now I has configured and build USB_CDC_F107 for by board, but when I connecting my device to host nothing happened.
btw code generated by STM32CoubeMX work fine and detected on USB.

in mcuconf.h defined STM32F107_MCUCONF with this configuration stm32_registry.h define STM32_OTG_STEPPING to 1 and hall_usb_lld.c initing GCCFG to

Code: Select all

#if STM32_OTG_STEPPING == 1
#if defined(BOARD_OTG_NOVBUSSENS)
#define GCCFG_INIT_VALUE        (GCCFG_NOVBUSSENS | GCCFG_VBUSASEN |        \
                                 GCCFG_VBUSBSEN | GCCFG_PWRDWN)
#else
#define GCCFG_INIT_VALUE        (GCCFG_VBUSASEN | GCCFG_VBUSBSEN |          \
                                 GCCFG_PWRDWN)
#endif
#else

I also define BOARD_OTG_NOVBUSSENS in board.h but it not helps.
What I do wrong? Why usbConnectBus(serusbcfg.usbp); not work?

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

Re: STM32F105CB as USB Device not detected

Postby Giovanni » Sun Sep 17, 2017 6:27 pm

Hi,

Make sure to take mcuconf.h from an F107 demo, create board files specific for your board and make sure that clock settings are appropriate (48MHz to USB).

It is generic advice but I have no elements to give a more specific answer.

Giovanni


Return to “ChibiOS/HAL”

Who is online

Users browsing this forum: No registered users and 5 guests