I found a chunk of aluminum with one of my Cuisw black pills mounted to it. The Cuisw boards are the ones with mounting holes (nice!) and 19 pins on each side.
Having it mounted on a block of aluminum (or on something with a bit of weight) is highly recommended. It makes things more civilized having it sit in one place on my desk, rather than dangling at the end of a cable. Or worse, being dragged off my desk onto the floor by the weight of a cable.
Also in my boxes I found a blue pill on a protoboard with two handy things attached. One is a ST-Link V2 dongle, which I will need. The other is a USB to serial gadget, which I will also need.
Just for the record, on the blue pill, the serial dongle is connected as follows:
Brown wire -- ground Red wire -- Rx on the USB to pin "A9" Purple wire -- Tx on the USB to pin "A10"
IMPORTANT -- on these Cuisw black pill boards, the SWD connector is reversed
from how it is on the blue pill boards!!
On the blue pill, if the connector is towards you, ground is on the right.
On the black pill, if the connector is towards you, ground is on the left..
NOTE -- the diagram for the WeAct boards shows the ground on the right, like the F103 blue pill.
Feb 27 19:02:55 trona kernel: usb 4-1.1: New USB device found, idVendor=0483, idProduct=3748, bcdDevice= 1.00 Feb 27 19:02:55 trona kernel: usb 4-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 Feb 27 19:02:55 trona kernel: usb 4-1.1: Product: STM32 STLinkNow I go to the directory that holds my bare metal "blink1" demo and type:
make make flashAnd presto! A blue LED near the SWD connector starts blinking. There is a red LED nearby that came on as soon as I plugged in the ST-Link.
Brown wire -- ground Red wire -- Rx on the USB to pin "A9" Orange wire -- Tx on the USB to pin "A10"I use a little USB hub to connect both the ST-Link and my USB to serial dongle. This reduces the tangle of cables on my desk. Pretty soon I will have a third cable for USB itself, making this even more beneficial.
When I plug things in, it sets up the serial dongle as /dev/ttyUSB1, and I set it to 115200 baud. Then I go to my "serial1" bare metal demo and:
cd serial1 make make flashNo LED flashing now, but on the serial console I see:
Testing 1 Testing 2 Testing 3 Testing 4 Testing 5For fun, I try my "serial2" demo also and it works as expected.
A final note regarding all of these cables. When I add a USB cable, I will have power coming to the board from two sources, the ST-Link and USB itself. This may or may not be a problem, but is worth thinking about. Since this 5 volt power comes from the same source (the cable feeding my USB hub) I am not terribly concerned. I could consider disconnecting the power from the ST-Link, as that is easy to do.
Note however that power from the ST-Link is 3.3 volts, while the power from USB is 5 volts. My Cuiisw unit has a nice big diode near the USB connector, which gives me a better feeling about having both power sources connected. However this feeds a 5v to 3.3 volt regulator which drives the 3.3 volt rail that is also connected to the ST-Link, which could lead to a disagreement about who is actually running the 3.3 volt rail.
I'll probably just let laziness rule the day and leave both connected. If bad things happen, I can replace the unit and reevaluate. Note that the WeAct units are different and have no diode from USB.
I am back to where I was 4 years ago after about an hour of getting reoriented.
Tom's Computer Info / tom@mmto.org