STM32 Black Pill Not Receiving Serial Data Via FTDI: UserSideException: Access is Denied Error

I am trying to test the serial output of my STM32 based Blackpill_f411ce development board. I have made a pretty simple program that I simply want to output to the serial monitor for now. Here it is:
image
In previous community posts, I was told to upload code with my stlink v2 dongle, and use another way of testing serial data as stlinks have no way of allowing your development board to talk back to the computer.
So, in order to receive data, I hooked up an FTDI board based on the following connections according to the following schematic:
image
Here is my connection to PA9 and PA10 as stated in the schematic:
image
and here is my ftdi board that connects those pins on the blackpill to my computer:


Now, everything uploads just fine, but when I hit the serial button, I get an error that says that COM3 could not open. I do not always get this error though, most of the times it just says “fail to connect to serial”. Here is a screen grab from my serial:

Is my issue hardware related or am I not configuring something correctly? Here is my .ini file too:
image
Thanks! :slight_smile:

This looks like double powering to me, since both VCC → 5V is hooked up between the FTDI ↔ Blackpill and 3.3V ↔ 3.3V between the ST-Link ↔ Blackpill. The board may not have diode protection against that? The ST-Link power should be fine, so the FTDI should only be connected via TX, RX and GND.

This is regular code in src/, not in test/, right?

Sanity check that COM3 is actually your FTDI. Unplug the FTDI. Open the Windows device manager. Expand the “Ports (COM & LTP)” section and note all available COM ports. Plug in the FTDI. Does a new COM port appear? If no, you don’t have the FTDI drivers installed at all. If yes, you still might have the wrong FTDI drivers installed. For example, on the download page, I think “Windows (Desktop)” works better than “Windows (Universal)”.

Hmm. I tried all that and I’m getting the same errors