When DBG_RST_BRK_EN is defined, the CPU starts with pmem_cen=0 and halt_flag=1 as reset values. The CPU still makes a program memory access to fetch the reset vector (from a likely not initialized memory area) and updates the PC value with it.
The PC is corrupted and the CPU has to be reset after the program memory is loaded.
Hi Sebastien,
This is actually the expected behavior. With this option, the CPU will stop just before executing the first instruction after a reset, which means that the instruction fetch already occurred.
Generating a CPU reset after the program memory is loaded from the serial debug interface is exactly what the software development tools are doing. For example, if you have a look at the "openmsp430-loader.tcl" tool, you will see that it calls the "ReleaseDevice" function, which in turns perform a reset cycle and then tells the CPU to resume execution.
Regards, Olivier
Thanks Olivier,
you may now close this non-existing bug... No problem to live with it.
Sebastien