Hi,
The code below SystemInit() is gray, which doesn't included during compile.
The SystemInit() function provided disable Watchdog function with default DISABLE_WDOG definition.

From you description, could you check if you can debug into main() function?
If not, which code will cause the chip reset?
Have a great day,
Mike
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------