It is not recommended to connected CMOD value on the SWD pins. This will affect the programmimg.
So what do you suggest?
If you are using SWD (and not JTAG) protocol for programming, then the pins P1 and P1 are free. There is XRES pin on the chip which is connected to JTAG 10-pin connector, hence P1 is also free. Therefore, you can use any of the pins P1, P1 and P1 to connect CMOD capacitor.
Thank you I will use SWD ;)