Browse Source

make sure the m0 is really running/stopped

pull/174/head
Hoernchen 12 years ago
committed by Piotr Esden-Tempski
parent
commit
4c8d260232
  1. 14
      lib/lpc43xx/ipc.c

14
lib/lpc43xx/ipc.c

@ -30,15 +30,10 @@ void ipc_halt_m0(void)
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* If the M0 has reset not asserted, halt it... */
if( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
while( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) | RESET_CTRL1_M0APP_RST);
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* Check again */
if( (rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) | RESET_CTRL1_M0APP_RST);
}
}
}
@ -56,15 +51,10 @@ void ipc_start_m0(u32 cm0_baseaddr)
/* If the M0 is being held in reset, release it */
/* 1 = no reset, 0 = reset */
if( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
while( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) & (~RESET_CTRL1_M0APP_RST));
rst_active_status1 = RESET_ACTIVE_STATUS1;
/* Check again */
if( !(rst_active_status1 & RESET_CTRL1_M0APP_RST) )
{
RESET_CTRL1 = ((~rst_active_status1) & (~RESET_CTRL1_M0APP_RST));
}
}
}

Loading…
Cancel
Save