Strange chip state after programming

Hello everyone,

I'm not exactly using the Arduino Zero, but my own self-soldered chip. It's currently just a chip on a break-out board, later I'm going to put in on a PCB. I'm using GitHub - arduino/ArduinoCore-samd: Arduino Core for SAMD21 CPU as a basis, although not the most current version. I use the following command (based on OpenOCD) to flash the chip after compiling my code:

openocd -f samd.cfg --command "program firmware.elf reset exit"

The file samd.cfg looks as follows:

source [find interface/cmsis-dap.cfg]

set ENDIAN little

source [find target/at91samdXX.cfg]

It may be hard to answer my question based on this, but I have the following problem: After the flashing, the chip is reset as it should. However, it then starts into some kind of 'strange state'. In particular, I'm using ArduinoLowPower to send the chip to sleep, and this doesn't work before I manually reset or re-power the chip.

Is it possible that the chip isn't really fully reset after programming or something?