Debug vs Flash VSC

I working on different applications using nRF5340 and nRF9160.

Debug: When Debugger is launched, the MCU reset repetitively as seen in LTE Monitor (Image 1) in case of asset_tracker application and in  Bluetooth peripheral on 5340 also. Sometimes, during programming for Debug, the connection break occurs and it takes may tries to launch Debugger.

Flash: When same code is run after Flash, then reset does not occur.

  

Related