Electronics > Beginners
CS32F103C8T6 datasheet and tests (was:"UNEXPECTED idcode" flashing bluepill)
ak634:
--- Quote from: adamfxtion on October 18, 2019, 10:37:16 am ---I am also having similar problems with USB enumeration and recent STM32 blue pill boards.
I did however find that using the opencm3 CDC example compiled in Platformio/VSC, ....
--- End quote ---
Thanks @adamfxtion, this version was actually the best performing. There are a small number of "malformed" packets reported by Wireshark, but they were retried and I could actually type in the console. I will probably conclude that the USB in these devices should not be relied upon, and my samples seem to come from a somewhat more defective batch. The problem (in my devices) is truncated packets sent from the devices. The errors could be due to sensitivity to timing or power supply. I am giving up for now and will use these boards for less demanding work.
For completeness, my dumps are below. This is with the Forth console:
--- Code: --- 1 0.000000000 host -> 55.0 USB 64 GET DESCRIPTOR Request DEVICE
2 0.000044000 55.0 -> host USB 64 GET DESCRIPTOR Response DEVICE[Malformed Packet]
3 0.000060000 host -> 55.0 USB 64 GET DESCRIPTOR Request DEVICE
4 0.000149000 55.0 -> host USB 82 GET DESCRIPTOR Response DEVICE
5 0.000178000 host -> 55.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
6 0.000242000 55.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
7 0.000268000 host -> 55.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
8 0.000338000 55.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
9 0.000361000 host -> 55.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
10 0.000431000 55.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
11 0.000455000 host -> 55.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
12 0.000524000 55.0 -> host USB 64 GET DESCRIPTOR Response CONFIGURATION[Malformed Packet]
13 0.000547000 host -> 55.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
14 0.000598000 55.0 -> host USB 73 GET DESCRIPTOR Response CONFIGURATION
15 0.000616000 host -> 55.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
16 0.000694000 55.0 -> host USB 73 GET DESCRIPTOR Response CONFIGURATION[Malformed Packet]
17 0.000723000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
18 0.000798000 55.0 -> host USB 68 GET DESCRIPTOR Response STRING
19 0.000815000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
20 0.000883000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
21 0.000886000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
22 0.000977000 55.0 -> host USB 100 GET DESCRIPTOR Response STRING
23 0.000980000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
24 0.001017000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
25 0.001020000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
26 0.001114000 55.0 -> host USB 104 GET DESCRIPTOR Response STRING
27 0.001117000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
28 0.001154000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
29 0.001157000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
30 0.001431000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
31 0.001434000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
32 0.001471000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
33 0.001474000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
34 0.001752000 55.0 -> host USB 66 GET DESCRIPTOR Response STRING[Malformed Packet]
35 0.001768000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
36 0.001811000 55.0 -> host USB 66 GET DESCRIPTOR Response STRING[Malformed Packet]
37 0.001833000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
38 0.002035000 55.0 -> host USB 66 GET DESCRIPTOR Response STRING[Malformed Packet]
39 0.002052000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
40 0.002126000 55.0 -> host USB 66 GET DESCRIPTOR Response STRING[Malformed Packet]
41 0.002143000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
42 0.002374000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
43 0.002391000 host -> 55.0 USB 64 GET DESCRIPTOR Request STRING
44 0.002459000 55.0 -> host USB 64 GET DESCRIPTOR Response STRING[Malformed Packet]
45 0.002612000 host -> 55.0 USB 64 SET CONFIGURATION Request
--- End code ---
This is with opencm3 example sent by @adamfxtion:
--- Code: --- 1 0.000000000 host -> 90.0 USB 64 GET DESCRIPTOR Request DEVICE
2 0.000114000 90.0 -> host USB 82 GET DESCRIPTOR Response DEVICE
3 0.000141000 host -> 90.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
4 0.000200000 90.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
5 0.000224000 host -> 90.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
6 0.000278000 90.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
7 0.000300000 host -> 90.0 USB 64 GET DESCRIPTOR Request DEVICE QUALIFIER
8 0.000359000 90.0 -> host USB 64 GET DESCRIPTOR Response DEVICE QUALIFIER[Malformed Packet]
9 0.000386000 host -> 90.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
10 0.000423000 90.0 -> host USB 64 GET DESCRIPTOR Response CONFIGURATION[Malformed Packet]
11 0.000446000 host -> 90.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
12 0.000507000 90.0 -> host USB 73 GET DESCRIPTOR Response CONFIGURATION
13 0.000531000 host -> 90.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
14 0.000564000 90.0 -> host USB 64 GET DESCRIPTOR Response CONFIGURATION[Malformed Packet]
15 0.000568000 host -> 90.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
16 0.000660000 90.0 -> host USB 64 GET DESCRIPTOR Response CONFIGURATION[Malformed Packet]
17 0.000663000 host -> 90.0 USB 64 GET DESCRIPTOR Request CONFIGURATION
18 0.000816000 90.0 -> host USB 131 GET DESCRIPTOR Response CONFIGURATION
19 0.000822000 host -> 90.0 USB 64 GET DESCRIPTOR Request STRING
20 0.000917000 90.0 -> host USB 68 GET DESCRIPTOR Response STRING
21 0.000921000 host -> 90.0 USB 64 GET DESCRIPTOR Request STRING
22 0.001030000 90.0 -> host USB 90 GET DESCRIPTOR Response STRING
23 0.001034000 host -> 90.0 USB 64 GET DESCRIPTOR Request STRING
24 0.001166000 90.0 -> host USB 116 GET DESCRIPTOR Response STRING
25 0.001190000 host -> 90.0 USB 64 GET DESCRIPTOR Request STRING
26 0.001291000 90.0 -> host USB 74 GET DESCRIPTOR Response STRING
27 0.001769000 host -> 90.0 USB 64 SET CONFIGURATION Request
28 0.001801000 90.0 -> host USB 64 SET CONFIGURATION Response
29 0.003141000 host -> 90.0 USBCOM 71 SET LINE CODING Request
30 0.003192000 90.0 -> host USB 64 URB_CONTROL out
--- End code ---
Note that DEVICE QUALIFIER "malformed" packets are expected as the device probably does not support them. There are two "malformed" GET configuration descriptor responses, but every other are good.
adamfxtion:
Just for the sake of completeness, I swapped one of the STM32's on a non working board with a Farnell UK sourced part, after which the board worked entirely as expected.
Taken together with the different chip ID, it seems certain that the chips are not actually ST parts and so any of these boards may well not work as expected, certainly for the USB, but quite possibly for other peripherals too.
It is one thing getting a different chip with appropriate marking, but mislabeled parts make them too big a gamble for me that taints all the STM32 system minimum boards, with it all but impossible to ensure any quality standard at all. Which is a great shame, as I really liked these boards otherwise.
And a picture of the part ordered from Farnell - Quality of the printing looks much better to me than the part originally supplied and also doesn't have the extra pair of dimples in the top.
mikerj:
ST seem to be keeping very quiet about about the proliferation of these suspect devices.
Macbeth:
I today received two new bluepill boards. I was pleased to see nicer looking boards than my first two, until I noticed the STM32 had that 991KA label :palm:
But these work perfectly! An absolute breeze to debug using ST-LINK and USB works without issue :) They even have the correct 1K5 resistor R10 on board.
Now for the bad board...
So the difference is the bad STM32 F103C8T6 is labelled 991KA 93 MYS 807 and it has 2 extra dimples. The marking is not as clear.
Also the PCB pinout labeling is very shoddy and it has a metal reset button whereas my good boards have a plastic reset button.
For what it's worth I purchased my crap boards for £3.01 from Aliexpress "Robotlinking Store" and got my good boards at "Shop912692 Store" for just £2.51 delivered.
Navigation
[0] Message Index
[*] Previous page
Go to full version