Soft reset with spifi

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by charchar on Tue Nov 05 09:57:04 MST 2013
I have a platform that boots and executes code out of spifi and I'm having lots of trouble getting it to soft reset without hanging somewhere in the reset process. 

I understand that resetting the spifi device is important.  And I've tried this by issuing a "read reset" command before
initiating a reset through the RGU. 

#define SPIFI_CMD     (*(volatile uint32_t *)0x40003004)
#define SPIFI_STAT    (*(volatile uint32_t *)0x4000301c)

void softReset()
// reset spifi device
SPIFI_CMD =(0xffu << 24) | // opcode 0xFF (read reset) for winbond
(0x1 << 21) | // frame form indicating opcode only
(0x0 << 19) | // field form indicating all serial
(0); // datalen
while(SPIFI_STAT & 2); // wait for command to complete
  RGU_SoftReset(RGU_SIG_SPIFI); // reset spifi controller
delayus(100000); // wait for spifi device to reset
  RGU_SoftReset(RGU_SIG_CORE); // reset processor

None of this works though.  Has anyone had any luck with this?