|
发表于 2022-8-2 00:12:47
|
显示全部楼层
void SetupTarget(void)
{
Report(" Release reset for CM0+");
MEM_WriteU32(0x4002B094, 0xC0000000); //Enable MUA clk gate
MEM_WriteU32(0x40025068, 0x00000004); //Set Boot From DFlash, Hold Reset
MEM_WriteU32(0x40025068, 0x00000000); //Release Reset
}
/*********************************************************************
*
* InitTarget
*/
void InitTarget(void) {
Report("******************************************************");
Report("J-Link script: Dual CORE Demo. J-Link script");
Report("******************************************************");
SetupTarget();
CPU = CORTEX_M0; // Pre-select that we have a Cortex-M0 connected
JTAG_AllowTAPReset = 0; // J-Link is allowed to use a TAP reset for JTAG-chain auto-detection
CORESIGHT_AddAP(0, CORESIGHT_AHB_AP);
CORESIGHT_AddAP(1, CORESIGHT_AHB_AP);
CORESIGHT_AddAP(2, CORESIGHT_AHB_AP);
CORESIGHT_IndexAHBAPToUse = 2; // Use second AP which is the AHB-AP for the core
} |
|