Hi,
If you float the SWDIO pin, which means that the pin is NO connection, I suppose that the SWDIO pin is an input pin, in the case, if you connect a pull-up resistor, you can get high logic voltage. If you can not get high voltage but get LOW logic voltage, I suppose that there are two cases, the SWDIO pin is in output mode and output low logic voltage, another case is that the SWDIO pin is damaged, shorten to GND internally.
The SWDIO is an input/output pin, it can output data and input data.
Pls connect the debugger probe to the SWD port and check the SWDIO pin waveform with a scope during downloading process.
Hope it can help you
BR
XiangJun Rong