usb_Deinit or usb_reset or restart ?
Company  
ST Home | Microcontrollers

Index  »  ARM9 STR9  »  usb_Deinit or usb_reset or restart ?
     
   usb_Deinit or usb_reset or restart ?
 Moderated by :   »  mirou  -  eris

Author
beginning argument    ( No reply )
milton.godinho   Posted 02-12-2008 at 16:47   



Registered on :
10-08-2009

Messages : 28

 OFF-Line

I am trying to restart my device, so I reset it using:

ARM_exe RAM_exe void Reset_Device(void)
{
pFunction Jump_To_Application;
PowerOff();
FMI->BBSR = 0x1;
FMI->NBBSR = 0x6;
FMI->BBADR = 0x00000 >> 2; // reset to boot
FMI->NBBADR = 0 ;
Jump_To_Application = (pFunction) ApplicationAddress;
Jump_To_Application();
}

but it hangs when it restarts. I have tried to comment the usb_init in my firmware and it worked out, so the problem is that I need to do a "usb_Deinit" before I am able to reset it properly.
I have tried this but without success:

void USB_DeInit(void)
{
VIC_ITCmd(USBLP_ITLine, DISABLE);
_SetCNTR(0x0003);
_SetISTR(0x0000);
_SetDADDR(0x0000);
_SetBTABLE(0x0000);
}

Can please somebody help me?

Milton



 Profile   Quote  
On Top

Search in the forums
 
Jump To