[Solved] Not able to connect using stlink after power reset.
I am porting opentx code to a board I am using. I have changed some part of the code and I am able to boot opentx and show something on display.
https://github.com/sanjuchopracool/opentx
But I have one serious issue. If I power off the board and power on again. Board does not connect to stlink. I have to press reset pin and erase all memory and again program it( this video helped to bring board up https://www.youtube.com/watch?v=jEz0C2bT2M0&list=LLW7VfakxkgeK75-Ki-53dOQ&index=4&t=0s).
How ever if I don't power it off , I can connect to it and reprogram it. in option byte WDG_SW was checked..
Please guide me to fix this issue.

