function Reset()
{
  TargetInterface.setICEBreakerBreakpoint(0, 0x00000000, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0x100, 0xF7);
  TargetInterface.runTestIdle();
  TargetInterface.setNSRST(0);
  TargetInterface.setNSRST(1);
  TargetInterface.waitForDebugState(1000);
  TargetInterface.trst();
}

function RamReset()
{
  Reset();
  /* Remap On-chip SRAM to 0x00000000 */
  TargetInterface.pokeWord(0x09001010, 1);
}

function FlashReset()
{
  Reset();
}

