Commit 134e018b authored by Dean Camera's avatar Dean Camera

Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating...

Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating when the SUSPI bit is set (thanks to Holger Steinhaus).

Remove redundant setting of UIDE in the AVR8 and AVR32 USB controller drivers.
parent 95a1aa4c
...@@ -75,12 +75,13 @@ void USB_Init( ...@@ -75,12 +75,13 @@ void USB_Init(
#if defined(USB_CAN_BE_BOTH) #if defined(USB_CAN_BE_BOTH)
if (Mode == USB_MODE_UID) if (Mode == USB_MODE_UID)
{ {
UHWCON |= (1 << UIDE); UHWCON |= (1 << UIDE);
USB_INT_Enable(USB_INT_IDTI); USB_INT_Enable(USB_INT_IDTI);
USB_CurrentMode = USB_GetUSBModeFromUID(); USB_CurrentMode = USB_GetUSBModeFromUID();
} }
else else
{ {
UHWCON &= ~(1 << UIDE);
USB_CurrentMode = Mode; USB_CurrentMode = Mode;
} }
#endif #endif
......
...@@ -112,8 +112,6 @@ ISR(USB_GEN_vect, ISR_BLOCK) ...@@ -112,8 +112,6 @@ ISR(USB_GEN_vect, ISR_BLOCK)
if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI)) if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI))
{ {
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Disable(USB_INT_SUSPI); USB_INT_Disable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI); USB_INT_Enable(USB_INT_WAKEUPI);
......
...@@ -117,10 +117,7 @@ void USB_ResetInterface(void) ...@@ -117,10 +117,7 @@ void USB_ResetInterface(void)
#if defined(USB_CAN_BE_BOTH) #if defined(USB_CAN_BE_BOTH)
if (UIDModeSelectEnabled) if (UIDModeSelectEnabled)
{ USB_INT_Enable(USB_INT_IDTI);
AVR32_USBB.USBCON.uide = true;
USB_INT_Enable(USB_INT_IDTI);
}
#endif #endif
USB_CLK_Unfreeze(); USB_CLK_Unfreeze();
...@@ -129,6 +126,7 @@ void USB_ResetInterface(void) ...@@ -129,6 +126,7 @@ void USB_ResetInterface(void)
{ {
#if defined(USB_CAN_BE_DEVICE) #if defined(USB_CAN_BE_DEVICE)
AVR32_USBB.USBCON.uimod = true; AVR32_USBB.USBCON.uimod = true;
USB_Init_Device(); USB_Init_Device();
#endif #endif
} }
...@@ -136,6 +134,7 @@ void USB_ResetInterface(void) ...@@ -136,6 +134,7 @@ void USB_ResetInterface(void)
{ {
#if defined(USB_CAN_BE_HOST) #if defined(USB_CAN_BE_HOST)
AVR32_USBB.USBCON.uimod = false; AVR32_USBB.USBCON.uimod = false;
USB_Init_Host(); USB_Init_Host();
#endif #endif
} }
...@@ -180,7 +179,6 @@ static void USB_Init_Device(void) ...@@ -180,7 +179,6 @@ static void USB_Init_Device(void)
USB_INT_Enable(USB_INT_EORSTI); USB_INT_Enable(USB_INT_EORSTI);
USB_Attach(); USB_Attach();
USB_Device_SetDeviceAddress(0);
} }
#endif #endif
......
...@@ -79,8 +79,6 @@ ISR(USB_GEN_vect) ...@@ -79,8 +79,6 @@ ISR(USB_GEN_vect)
if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI)) if (USB_INT_HasOccurred(USB_INT_SUSPI) && USB_INT_IsEnabled(USB_INT_SUSPI))
{ {
USB_INT_Clear(USB_INT_SUSPI);
USB_INT_Disable(USB_INT_SUSPI); USB_INT_Disable(USB_INT_SUSPI);
USB_INT_Enable(USB_INT_WAKEUPI); USB_INT_Enable(USB_INT_WAKEUPI);
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
* - Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0 * - Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0
* for other uses * for other uses
* - Updated the software USART code in the XPLAIN Bridge application so that the incomming bits are sampled at their mid-point * - Updated the software USART code in the XPLAIN Bridge application so that the incomming bits are sampled at their mid-point
* instead of starting point, to give maximum reliability (thanks to Anton) * instead of starting point, to give maximum reliability (thanks to Anton Staaf)
* *
* <b>Fixed:</b> * <b>Fixed:</b>
* - Core: * - Core:
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
* - Fixed Still Image Host class driver exiting the descriptor search routine prematurely if the data pipes (but not event pipe) * - Fixed Still Image Host class driver exiting the descriptor search routine prematurely if the data pipes (but not event pipe)
* is found * is found
* - Fixed missing call to Pipe_SetInfiniteINRequests() in the Pipe_ConfigurePipe() routine * - Fixed missing call to Pipe_SetInfiniteINRequests() in the Pipe_ConfigurePipe() routine
* - Fixed Remote Wakeup broken on the AVRs due to the mechanism only operating when the SUSPI bit is set (thanks to Holger Steinhaus)
* - Library Applications: * - Library Applications:
* - Fixed Benito project discarding incoming data from the USB virtual serial port when the USART is busy * - Fixed Benito project discarding incoming data from the USB virtual serial port when the USART is busy
* - Fixed broken DFU bootloader, added XPLAIN support for bootloader start when XCK jumpered to ground * - Fixed broken DFU bootloader, added XPLAIN support for bootloader start when XCK jumpered to ground
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment