2023-04-11 03:15 AM - edited 2023-11-20 08:32 AM
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.
Both 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.
Solved! Go to Solution.
2023-04-11 04:47 AM
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
2023-04-11 04:21 AM
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.
2023-04-11 04:47 AM
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
2023-04-11 04:51 AM - edited 2023-11-20 08:33 AM
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:
But 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:
2023-04-11 05:08 AM - edited 2023-11-20 08:33 AM
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.