I am trying to program an STM32F7 series MCU on a custom PCB (migrating over from a nucleo dev board) but I am having trouble connecting to the MCU. Using STM32CubeProgrammer (the new programming software) I get the error "DEV_NO_DEVICE" and the logfile reads:
12:45:54 : ST-LINK Firmware version : V2J29S7 12:45:54 : Error: ST-LINK error (DEV_NO_DEVICE)
The GUI reports that my target voltage is 3.22V and I have 'connect under reset', 'hardware reset' and 'SWD' selected on the options panel.
Interestingly, I can update the firmware of the board by launching the update window with the STLINK-V2 unplugged, replugging it with the window open and then beginning the update. Beginning the update procedure with the board plugged in results in the error "ST-LINK is not in the DFU mode. Please restart it". The first time I updated, I was able to connect to the chip (I didn't program anything at the time), but not since.
EDIT: Thanks for the answers/suggestions. My spare ST-Link V2 adapter arrived today and trying my luck with that actually solved the problem! Must have been a bad adapter.