STM32F105CB as USB Device not detected

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

STM32F105CB as USB Device not detected

Post by Spider »

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: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: STM32F105CB as USB Device not detected

Post by Giovanni »

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
Post Reply