Исправил ресет
This commit is contained in:
parent
6fe68a8ad0
commit
f2240f1cd7
@ -16,3 +16,18 @@ encoding//CPU1_RAM/src/subdir_rules.mk=UTF-8
|
|||||||
encoding//CPU1_RAM/src/subdir_vars.mk=UTF-8
|
encoding//CPU1_RAM/src/subdir_vars.mk=UTF-8
|
||||||
encoding//CPU1_RAM/subdir_rules.mk=UTF-8
|
encoding//CPU1_RAM/subdir_rules.mk=UTF-8
|
||||||
encoding//CPU1_RAM/subdir_vars.mk=UTF-8
|
encoding//CPU1_RAM/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/device/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/device/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/lib/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/lib/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/makefile=UTF-8
|
||||||
|
encoding//CPU2_RAM/objects.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/sources.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/ExternalEEPROM/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/ExternalEEPROM/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/Peripherals/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/Peripherals/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/src/subdir_vars.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/subdir_rules.mk=UTF-8
|
||||||
|
encoding//CPU2_RAM/subdir_vars.mk=UTF-8
|
||||||
|
|||||||
@ -323,7 +323,7 @@ void emif_init(void)
|
|||||||
//
|
//
|
||||||
//Configure GPIO pins for EMIF1
|
//Configure GPIO pins for EMIF1
|
||||||
//
|
//
|
||||||
setup_emif1_pinmux_async_16bit(0);
|
setup_emif1_pinmux_async_16bit(0);
|
||||||
|
|
||||||
//
|
//
|
||||||
//Configure the access timing for CS2 space
|
//Configure the access timing for CS2 space
|
||||||
|
|||||||
@ -379,15 +379,23 @@ void ipc_run(void)
|
|||||||
{
|
{
|
||||||
ReadFromCm = 2;
|
ReadFromCm = 2;
|
||||||
IPC_readCommand(IPC_CPU1_L_CM_R, 0, 0, &InCommand, &InAddr, &InData );
|
IPC_readCommand(IPC_CPU1_L_CM_R, 0, 0, &InCommand, &InAddr, &InData );
|
||||||
|
#ifdef CPU1
|
||||||
if((InCommand >> 16) == RESET_NOW) CpuSysRegs.SIMRESET.bit.XRSn = 1;
|
if((InCommand >> 16) == RESET_NOW)
|
||||||
|
{
|
||||||
|
// CpuSysRegs.SIMRESET.bit.XRSn = 1;
|
||||||
|
CpuSysRegs.SIMRESET.bit.CPU1RSn = 1;
|
||||||
|
IPC_sendCommand(IPC_CPU1_L_CM_R, COMMAND_ACCEPTED, ZD24C02A_2K_I2C, 0, 0);
|
||||||
|
IPC_setFlagLtoR(IPC_CPU1_L_CM_R,(1<<0));
|
||||||
|
ReadFromCm = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
switch(InCommand & 0xFFFF)
|
switch(InCommand & 0xFFFF)
|
||||||
{
|
{
|
||||||
case INT_FLASH:
|
case INT_FLASH:
|
||||||
getMessage_from_Cm_Flash();
|
getMessage_from_Cm_Flash();
|
||||||
break;
|
break;
|
||||||
#ifdef CPU1
|
#ifdef CPU1
|
||||||
case EMIF:
|
case EMIF:
|
||||||
getMessage_from_Cm_EMIF();
|
getMessage_from_Cm_EMIF();
|
||||||
break;
|
break;
|
||||||
@ -400,7 +408,7 @@ void ipc_run(void)
|
|||||||
case ZD24C02A_2K_I2C:
|
case ZD24C02A_2K_I2C:
|
||||||
getMessage_from_Cm_ZD24C02A();
|
getMessage_from_Cm_ZD24C02A();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
IPC_sendCommand(IPC_CPU1_L_CM_R, WRONG_ID, 0, 0, 0);
|
IPC_sendCommand(IPC_CPU1_L_CM_R, WRONG_ID, 0, 0, 0);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -78,8 +78,9 @@ void InitPerif(void)
|
|||||||
PWMInitEnable();
|
PWMInitEnable();
|
||||||
PWMInitInterruptEn();
|
PWMInitInterruptEn();
|
||||||
PWMAllInit();
|
PWMAllInit();
|
||||||
|
emif_init();
|
||||||
#endif
|
#endif
|
||||||
ipc_init();
|
ipc_init();
|
||||||
Internal_flash_Init();
|
Internal_flash_Init();
|
||||||
emif_init();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user