can't debug code using st link
Hi community @STTwo-32 ,
I am using stm32f407vet6 board I am new to stm32 board.I wrote an Hello world program in STM32cubeide and i try to debug the code.I bought an ST-link v2 from online.when I try to debug the code it says frimware upgrade require.I upgrade the frimware in DFU mode then it shows this error

and I watched a youtube vedio where he use st-link utility software and he instructed to connect under reset mode and use full chip erase.But when i try to connect under reset mode it shows this error message

i also tried stm32 cube programmer

it says not connected on the top right and also target voltage 0.i also checked power connection and connection between st-link and my board.
