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
FBL
ST Employee

Hi @maac 

It seems USB root hub does not set address to your device. You need to ensure that the STM32 and the USB hub are properly powered.

  • Verify the connections between the STM32 and the USB hub. Ensure that the DP and DM lines are correctly connected and there are no short circuits.
  • Check the isolator connections to make sure it is properly isolating the USB lines without introducing signal integrity issues.
  • Ensure that the 24MHz crystal is properly connected and oscillating. Incorrect crystal connections can cause USB communication failures.

Follow the recommendations in the schematics provided in Nucleo F303 FBL_1-1731928128043.png

Provide USB traffic so that we can help you investigate further. In your case, using USBPcap in Wireshark could be helpful.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!
maac
Associate II

As i said before, the current fw is a Vendor Specific device and it's running(at least it's detected by Windows and the PC software), So i don't think there is a problem in the design. I'm looking to change or get better(i don't know for the moment) that USB fw because there is no documentation about, and i'm trying to run examples first. I can't sniff the communication cause the USB is not detected as i said.


@maac wrote:

As i said before, the current fw is a Vendor Specific device and it's running.


So where has this FW come from?

Do you have the source? Do you have debug access? Do you have a contact for support?

 


@maac wrote:

 i'm trying to run examples first.


I would strongly suggest that you start by running the examples on the hardware they were intended for.

Then they should work, and you can spend time studying how they work.

If they don't work, you will be able to get support - as it's known hardware.

Once you understand how the examples work, then you'll be better equipped to find what's going wrong on your custom hardware - maybe it has other things which need to be enabled and/or configured ... ?



So where has this FW come from?

Do you have the source? Do you have debug access? Do you have a contact for support?

The engineer who worked on the FW of this PCB.

I have the source and i can debug through it software using a sniffer. I can't contact him and there is no support.

 


@maac wrote:


The engineer who worked on the FW of this PCB.


Are you in the company which designed the PCB and/or the original firmware?

 


@maac wrote:


I have the source and i can debug through it software using a sniffer.


So you have debug access to the code in CubeIDE, or somesuch? ie, you can step through it, inspect variables, etc?

So do that, and then compare that against the examples - see where, exactly, the example fails; compare that to what the original firmware does.


Are you in the company which designed the PCB and/or the original firmware?

Yes, the original fw is the current.


So you have debug access to the code in CubeIDE, or somesuch? ie, you can step through it, inspect variables, etc?

So do that, and then compare that against the examples - see where, exactly, the example fails; compare that to what the original firmware does.


Yes, i can debug things, the fw uses ChibiOS under Chibi Studio IDE.

maac
Associate II

Hello,

 

I'm back to know if you have any idea why a simple USB example can't work looking the schematics i sent knowing that there is a USB fw working on it that i want to change.

 

Thanks.

As suggested, have you got any examples working on the hardware they were intended for?

I will give a feedback when i'll try with a dev board.