MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// CFGR (1<<10 == Allow output from slave)
MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// Bug in silicon? If coming out of cold boot, and we don't do our little "song and dance" this has to be called.
MCF.WriteReg32(dev,DMCONTROL,0x80000001);// Make the debug module work properly.
MCF.WriteReg32(dev,DMCONTROL,0x80000001);// Initiate a halt request.
MCF.WriteReg32(dev,DMCONTROL,0x00000001);// Clear Halt Request.
// MCF.WriteReg32( dev, DMCONTROL, 0x00000001 ); // Clear Halt Request. This is recommended, but not doing it seems more stable.
// Sometimes, even if the processor is halted but the MSB is clear, it will spuriously start?
MCF.FlushLLCommands(dev);
break;
case1:
...
...
@@ -1377,6 +1400,10 @@ static int DefaultHaltMode( void * dev, int mode )
MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// CFGR (1<<10 == Allow output from slave)
MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// Bug in silicon? If coming out of cold boot, and we don't do our little "song and dance" this has to be called.