function Reset()
{
  TargetInterface.pokeWord(0x40E00018, 0xFFFFFFFF); // GPSR0
  TargetInterface.pokeWord(0x40E0000C, 0xCD82A858); // GPDR0
  TargetInterface.pokeWord(0x40E00010, 0xFCFFAB80); // GPDR1
  TargetInterface.pokeWord(0x40E00014, 0x0001FFFF); // GPDR2
  TargetInterface.pokeWord(0x40E00054, 0x80000000); // GAFR0_L
  TargetInterface.pokeWord(0x40E00058, 0xA5254010); // GAFR0_U
  TargetInterface.pokeWord(0x40E0005C, 0x599A9550); // GAFR1_L
  TargetInterface.pokeWord(0x40E00060, 0xAAA5AAAA); // GAFR1_U
  TargetInterface.pokeWord(0x40E00064, 0xAAAAAAAA); // GAFR2_L
  TargetInterface.pokeWord(0x40E00068, 0x00000002); // GAFR2_U
  TargetInterface.pokeWord(0x48000008, 0x2EF925D8); // MSC0
}

function SRAMReset()
{
  Reset();
}

function FLASHReset()
{
  Reset();
}