After programming something to the address 0x00000000 (flash), the size doesn't matter, the SoC became inaccessible. If I do flash mass erase and assert reset, the AHB bus is accessible again and SoC can be halted with writhing to DHCSR, stepping and that stuff. But if I program the address 0x00000008 or above, everything works and AHB bus is still accessible after reset, mass erase isn't needed.
Is the first 64 bits of the flash checked at boot process and when addresses 0x00000000-0x00000008 is not erased, this locks the bus?
One additional question:
When I download code to ram and run, after ~7 seconds the reset automatically happens and the VCATCH bit in DFSR(0xE000ED30) is set. This is not related with the code that is executed, even looping while(1) this occur. Watchdog is disabled and from status register can confirm that watchdog is not the cause of this.
Thank and have a nice day,
Jaka