Hi All,
I have implemented a reset command using the IOCTL_HAL_REBOOT code.
The implementation is as follows:
case IOCTL_HAL_REBOOT:
{
volatile OST_REGS *const v_pOSTReg = (OST_REGS
*)OST_BASE_U_VIRTUAL;
// Enable the Watchdog timer
v_pOSTReg->osmr3 = v_pOSTReg->oscr + 5 * RESCHED_INCREMENT;
v_pOSTReg->ower = 1;
INTERRUPTS_OFF();
// Nothing can save us now
for( ;; ) ;
// Should never get here
return FALSE;
}
This works properly and the device reboots successfully on 9 out of 10
occasions. However, on the 10th the following is reported from the
debug port:
Windows CE Kernel for ARM (Thumb Enabled) Built on Jun 1 2004 at
16:38:37
ProcessorType=02d0 Revision=6
sp_abt=ffff5000 sp_irq=ffff2800 sp_undef=ffffc800 OEMAddressTable =
98381eb0
Sp=ffffc7cc
PSMFSD:DLL Process Attach
PSMHAL:Error (189) from PSMHAL_CFICompatCheck
PSMHAL:IOCtl(INIT):Error on init (189)
PSMFSD_MountDisk: FG_Init failed! status=bd
The platform is based on PXA255 processor, running CE.NET V4.2 using
Intel's IPSM V3.7 library.
My guess is that just prior to the watchdog kicking the processor, the
Flash RAM had a command issued to it that is not complete when the
PSMFSD driver loads.
Is this a correct assumption? and if so, what is the best way to
prevent it from happening?
Do I grab the Mutex before starting the watchdog? Can I even issue a
CreateMutex() in the OEMIoControl() function?
Thanks for your assistance in advance.
Brian Price
brianprice_AT_appliedcs_DOT_com_DOT_au