Question
Cannot connect SWD J-link GDB Server to STM32 MCU in stop mode
Posted on January 31, 2014 at 17:50
Hi all,
I wrote a small program for testing a STM32L152CBT6 Stop Mode via command PWR_EnterSTOPMode(PWR_Regulator_LowPower, PWR_STOPEntry_WFI).The program switches to stop mode immediatelly after MCU starts and after 4 seconds the RTC clock IRQ wake up the MCU.This sequence runs in while(1) cycle and writes via SWO ITM_SendChar sentences ''going to stop...'' and ''wake up''.Everything works perfectly well BUT after I've disconnected SWD J-Link GDB Server it is not possible to connect again :-(.The Segger J-link GDB server just writes:3,3V ...Connecting to target...ERROR...Could not connect to targetTarget connection failed. GDB Server will be closed....and GDB server finishes running.I've tried various reset types in J-Link, J-LinkSTM32 for reset the MCU to default state but with no success.I think the Debug engine is not running in stop mode and the J-Link GDB server cannot detect the target.Please help me how can I reset the MCU a flash or erase the program in memory.Thanksjdx #swd-stop-mode-stm32