示例#1
0
// This function is called by the system when it needs to perform a
// soft reset. If you need to reset any specific hardware do it here
void targetBoardPrepareReset(void)
{
	//this function will assure that the board is ready for reset
  targetSetMinConfigROM();
  lhlSetIRMEnabled(FALSE);
  lhlBriForceBusReset();

  TCTaskWait(1200);  //enough for computer to determine the device has gone with new LLC fix.
}			
示例#2
0
// This function is called by the system when it needs to perform a
// soft reset. As we are using CS6 which becomes A21 during boot we would
// actually chip select the CPLD when trying to boot from the Flash and that
// would make the system crash.
// To avoid this we disable the CPLD parallel mode before resetting.
void targetBoardPrepareReset(void)
{
	//this function will assure that the board is ready for reset
	if (cpldSupported) 
	{
			//we do not want the CPLD to respond to parallel requests at this point
			spiOpBlock(cpldSSId, CPLD_SPI_WR_CMD(CPLD_CTRL_REG, CPLD_CTRL_CODEC_EN | 
																CPLD_CTRL_SPI1_EN | 
																CPLD_CTRL_SPI2_EN | 
																CPLD_CTRL_USER_EN), NULL);
			//disable the CS6
			*((volatile uint32 *) MEM_SMSKR6) = 0x00000020;//SRAM, off, set 0

	}
	targetSetMinConfigROM();
	lhlSetIRMEnabled(FALSE);
  	lhlBriForceBusReset();

  	TCTaskWait(1200);  //enough for computer to determine the device has gone with new LLC fix.
}