STM32L031 not running after stopping debugging
When using the debugger, the processor is forced to execute from a certain region.
On power-on reset, the bootloader determines where it should start. Some pins or flash location provide the bootloader with instructions.