cancel
Showing results for 
Search instead for 
Did you mean: 

USB device example

maac
Associate II

Hello everyone,

I have an stm32f303cbt6 design (see image below) connected to an hub(USB2533) and an adum for isolation, i'm trying to run a USB device CDC example by creating a new project in the Stm32CubeIDE using device tool configuration.

 

I selected :

- RTC : HSE Bypass clock source (24Mhz)

- SYS : Serial wire debug 

- USB : fs device

- Middleware : USB device CDC

 

When i build and i compil to my board, windows doesn't recognise it, can you help me with that ?

(i tried also to put the connect_usb pin to 3.3 V, i got same thing)

 

Thanks.

 

maac_0-1731928466754.png

 

 

 

18 REPLIES 18

@maac wrote:

windows doesn't recognise it,


Does it not see it at all? give an error? other?

gbm
Lead III

Too little information give for a reasonable help, but maybe you should start by increasing the default stack and heap sizes to twice the value.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

I don't have windows message.
I got this in USBTree (the hub has 3 downstream), it seems like the hub is detected but not the device (stm32).

maac_1-1731601411898.png

 

maac
Associate II

I gave informations as possible as i know, you can ask for information so i can put it.

The default configuration seems to make the USB detected at least, i don't undrestand what do you mean by increasing.


@maac wrote:

it seems like the hub is detected but not the device (stm32).


Is the device detected without the Hub ?

If you don't get any messages, and nothing appears in Device Manager, then the PC is not even seeing that anything has been plugged it.

Are you sure that you are using a good data cable - not just a charging cable?


@maac wrote:

i don't understand what do you mean by increasing.


"increasing" = "making bigger/larger"

ie, Whatever size your Heap and Stack currently are, trying making them twice that size.

I can't plug the device alone, the design is soldered on the PCB.

Yes, i'm using usual cables. The actual fw running inside is using USB Vendor Specific and it's well detected but when i try the example i describe, it's not running. 


@maac wrote:

I can't plug the device alone, the design is soldered on the PCB.


So the hub is part of your PCB?

Would be helpful to show a block diagram...

This is the hub part.

maac_0-1731928351765.png