[Icc-avr] Good old USB

Andrew andrew_166 at msn.com
Fri Jan 4 01:51:52 PST 2008


Hi,



I am trying to get the suspend sequence correct as per datasheet so i avoid 
any possible software bus, the following is from the datasheet: -



Suspending the USB interface



 Clear Suspend Bit

 Set USB suspend clock

 Disable PLL

 Be sure to have interrupts enabled (WAKEUPE) to exit sleep mode

 Put the MCU in sleep mode



I think the following code does the above: -



Clear the suspend Bit as i cannot find a direct suspend Bit/register i think 
it means:-



USBCON = 0x00;



Although there is the following (from the UDADDR reg): -



 0 - SUSPE - Suspend Interrupt Enable Bit



Set to enable the SUSPI interrupt.

Clear to disable the SUSPI interrupt.



Does it mean clear then set this?



Ok onto the "Set USB suspend clock" I think it means setting the FRZCLK in 
the USBCON register.



"Disable PLL" i think i have this correct: - by clearing the



Bit 1 - PLLE: PLL Enable in the PLLCSR registers, but do I also need to 
clear the Bit 0 - PLOCK: PLL Lock Detector ?



Any Help on this would be good.



Thanks,



Andrew









More information about the Icc-avr mailing list