ISR with debugger doesn't work when N_RST not wired (SWD) on STM32F0
Hello,
I'm facing a problem that I can't explain. In most of my devices, the SWD connector is completely wired (ca. VCC/GND/SWDIO/SWCLK/NRST), and I never had any problem to debug those devices with SystemWorkbench and a STLINK-2 debugger.
One of my device doesn't have the NRST wired. So only SWDIO and SWCLK are connected to the MCU (STM32F051). When I use the debugger with it, the interrupts are not fired. The SysTick counter is not incremented at all, and so it is almost impossible to debug as I use HAL_Delay() (which relies on the SysTick) in my code. I've checked almost all the registers, and I didn't see anything special that could explain why the interrupts are not fired.
I wired the NRST line (it was not easy on a QFN chip with very short accessibles tracks), and the interrupts are fired in that case.
When NRST is not connected, I have to add "monitor halt;" during the initialization, otherwise it is not possible to flash the device. Software reset doesn't work neither, so I have to set the "Connect under reset" option. I don't know if "monitor halt" is the correct command in that case, but at least, I can flash and debug my code (without interrupts...).
If I remove the debugger and reset the MCU (by power cycling the power supply), interrupts works fine (I made a small code with HAL_Delay() to blink a LED).
I really don't understand why NRST change the interrupts behavior. I tried also on a Discovery board (STM32F0DISCO), and removed SB19 (NRST signal between CN3 and STM32F051R8), and I had the same problem.
My questions are :
1. Does someone can explain me this behavior difference ?
2. Does someone can tell me if it is possible to have the interruptions working without NRST line ?
Thank you in advance,
Paul