cancel
Showing results for 
Search instead for 
Did you mean: 

(SOLVED) Pc can't detect USB on Nucleo F303ZE, but led is turned on.

JMarc.5
Associate II

Hi, I've got a Nucleo F303ze and I'm trying to send and receive data via USB without the ST-Link, so I'm powering the board with an 9V battery.

When I connect the USB in CN13 the LD8 turns on but on my device manager there is no new connection.

When I use ST-link everything seems to work fine as I can upload the program without problem and the board is detected in the device manager, but it still doesn't recognize anything with CN13.

I've tried several cables and USB ports but none work as well as two different boards.

I'll add a picture of the board state, it is brand new.


_legacyfs_online_stmicro_images_0693W00000bhrG6QAI.pngBoth LD6(PWR) and LD8 are turned on, and LD4 blinks slowly.

I'm following this tutorial for the code: https://controllerstech.com/send-and-receive-data-to-pc-without-uart-stm32-usb-com/

But seeing as the board isn't even detected and I can't use putty to see if the data is being sent I dont think there is a problem with the code yet.

Is there anything I'm missing? Thank you very much.

1 ACCEPTED SOLUTION

Accepted Solutions

The 'F303 does not have internal pullup on DP. I don't have this board, but from casual reading of UM1974 it appears that there's an external pullup resistor R70 connected to PG6 through SB186, so make sure that SB is shorted and that your software sets PG6 appropriately.

JW

View solution in original post

4 REPLIES 4
KDJEM.1
ST Employee

Hello @JMarc.5​ ,

Try to increase the heap size, or configure the USB library to use static allocation.

For more explanation, I advise you to follow this article to solve the problem.

I hope this help you!

Kaouthar

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.

The 'F303 does not have internal pullup on DP. I don't have this board, but from casual reading of UM1974 it appears that there's an external pullup resistor R70 connected to PG6 through SB186, so make sure that SB is shorted and that your software sets PG6 appropriately.

JW

JMarc.5
Associate II

Hi, thank you for your response. I've tried changing the minimum heap size but to no avail, it still doesn't recognize the USB. I add a picture of how I've done it:


_legacyfs_online_stmicro_images_0693W00000bhre3QAA.pngBut in the article that you posted I don't know what I'm supposed to change to use static allocation, here in usbd.conf.h:


_legacyfs_online_stmicro_images_0693W00000bhreXQAQ.png 

JMarc.5
Associate II

Hi, thanks to all. I've solved it now thanks to waclawek.jan 's response.

I only had to add this to the code:

 HAL_GPIO_WritePin(GPIOG, GPIO_PIN_6, GPIO_PIN_SET);

To set PG6 to high. Now the USB works and data is being sent.


_legacyfs_online_stmicro_images_0693W00000bhrbtQAA.png