Nucleo L432KCU6 upload

I cannot upload code to the Nucleo L432KCU6, if I am not pressing the RESET switch !!!
Not pressing the RESET switch I got this error:

Configuring upload protocol…
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\nucleo_l432kc\firmware.elf
xPack Open On-Chip Debugger 0.12.0-01004-g9ea7f3d64-dirty (2023-01-30-15:04)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1

hla_swd
Error: init mode failed (unable to connect to the target)
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked

*** [upload] Error 1

What am I doing wrong ?
Thanks in advance.

/Jens

SOLVED:

Disabled these lines in my platformio.ini:

build_flags =
; -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC
; -D USBCON
;monitor_dtr = 1

And Serial.xxx is now working too on the USB connector :+1: