STM32F405 SWD and JTAG don't work
For some reason I am unable to connect to my custom STF32F405RGT6 board via SWD or JTAG.
I originally had my board wired as this table below:
| ST-LINK/V2 | ST-LINK/V2 | My Board | My Board |
| Pin Number | Connector CN3 | MCU Pin | MCU Pin |
| 1 | Target VCC | ||
| 2 | Target VCC | VCC | |
| 3 | TRST | ||
| 4 | GND | GND | |
| 5 | TDI | PA15 | TDI |
| 6 | GND | GND | |
| 7 | TMS_SWDIO | PA13 | TMS |
| 8 | GND | GND | |
| 9 | TCK_SWCLK | PA14 | TCK |
| 10 | GND | GND | |
| 11 | Not connected | ||
| 12 | GND | ||
| 13 | TDO_SWO | PB3 | TDO |
| 14 | GND | ||
| 15 | NRST | 7 | nRST |
| 16 | GND | ||
| 17 | Not connected | ||
| 18 | GND | ||
| 19 | VDD | ||
| 20 | GND |
This is from the ST-LinkV2 documentation Table 4: https://www.st.com/resource/en/user_manual/um1075-stlinkv2-incircuit-debuggerprogrammer-for-stm8-and-stm32-stmicroelectronics.pdf
I have tried both SWD and JTAG with all possible reset methods through the CubeProgrammer and IDEDebug configuration:

My schematics look like this:




I have 3V3, 3V3A up and measured as 3.26V on my multimeter, and VCAP is at 1.2V.
I tried both versions (high or low) of the BOOT0 pin and saw no difference.
I kept getting one of these two errors:

I then removed R501 and still saw these errors.
I also tried a few variations of pulling nRST high or low, as well as PB4 high or low, or even connecting PB4 to R501 which would allow the nRST from the STLinkV2 to be connected to TRST of the STM32.
Why am I not able to communicate through this interface?
