2025-01-28 04:24 AM - last edited on 2025-01-28 05:09 AM by Andrew Neil
Hello,
I found this schematic and layout with a stm32f103c8t6. I ordered it and wanted to programm it.
With stm32cubeprogrammer I detect the stm32 no problem via ST-LINK.
Same with stm32cubeide I can download successfully the code.
But now the problem is that eventhough the code is downloaded successfully the simple program to blink a pin to which I attach a diode is not working and I don’t see why.
I also want to be able to send data from my computer to the STM32 with USB but after downloading the code with "usb_device.h" and MX_USB_DEVICE_Init();, deconnecting ST-LINK and connecting with USB the STM32 is not recognized by the computer.
Any idea of what I could look for or ressources ?
If you see any problem in the design please tell me.
Regards,
Jean
2025-01-28 05:12 AM
So have you used the debugger?
2025-01-28 05:13 AM
Did you get your own board working?
https://community.st.com/t5/stm32cubeprogrammer-mcus/stm32f103c8t6-no-usb-detection/td-p/739695
2025-01-28 07:34 AM
Unfortunately, our logo on an MCU does not prove at all that it is an original. STM32F103C8T6 in particular have been counterfeited on a large scale for several years, including the logo.
In cases where you cannot be completely sure that the seller is selling original goods (Aliexress, Ebay, etc.), it is advisable to check this with a test programme. You can also find tips on this here in the community, e.g. here or there.
Regards
/Peter
2025-01-28 08:03 AM
The MCU that the manufacturer used looks like this one from the link you send, is this the one you said is counterfeit?
2025-01-28 08:06 AM
No that's why I tried to do this new PCB.
2025-01-28 08:08 AM
Yes
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.15.0
-------------------------------------------------------------------
Log output file: C:\Users\JEAN~1.TAP\AppData\Local\Temp\STM32CubeProgrammer_a43840.log
ST-LINK SN : E1007200D0D2139393740544
ST-LINK FW : V2J43S7
Board : --
Voltage : 3.25V
SWD freq : 4000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x410
Revision ID : Rev X
Device name : STM32F101/F102/F103 Medium-density
Flash size : 64 KBytes
Device type : MCU
Device CPU : Cortex-M3
BL Version : --
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_a43840.srec
File : ST-LINK_GDB_server_a43840.srec
Size : 29.80 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 29]
Download in Progress:
File download complete
Time elapsed during download operation: 00:00:01.890
Verifying ...
Download verified successfully
Shutting down...
Exit.
2025-01-28 08:11 AM
That just shows the programmer connecting to the chip, and programming it.
Have you used the CubeIDE debugger to see what your code is actually doing?
2025-01-28 08:13 AM
As I already mentioned: as long as you can't trace the supply chain in detail, nobody can say for sure, only one of the tests mentioned can clarify this.