[Bug] Fix non-functional S3 wakeup / resume from suspense (#19780)
* Update ChibiOS-Contrib for USB suspend fixes * Remove S3 wakup workaround ChibiOS OTGv1 driver has a remote wakeup bug that prevents the device to resume it's operation. 02516cbc24647f522eee975e69cc0c8a925470eb introduced a hotfix that forcefully restarted the usb driver as a workaround. This workaround broke multiple boards which do not use this driver / peripheral. With the update of ChibiOS this hotfix is now obsolete. * Remove restart_usb_driver overrides they are no longer necessary as the workaround is not needed anymore for stm32f4 * Remove unused RP_USB_USE_SOF_INTR defines The SOF interrupt is enabled dynamically by the RP2040 usb driver
This commit is contained in:
		
							parent
							
								
									4aa765b72e
								
							
						
					
					
						commit
						a87c74ebe1
					
				
					 14 changed files with 14 additions and 47 deletions
				
			
		| 
						 | 
				
			
			@ -106,7 +106,6 @@
 | 
			
		|||
#define RP_USB_USE_USBD0                    TRUE
 | 
			
		||||
#define RP_USB_FORCE_VBUS_DETECT            TRUE
 | 
			
		||||
#define RP_USE_EXTERNAL_VBUS_DETECT         FALSE
 | 
			
		||||
#define RP_USB_USE_SOF_INTR                 TRUE
 | 
			
		||||
#define RP_USB_USE_ERROR_DATA_SEQ_INTR      FALSE
 | 
			
		||||
 | 
			
		||||
#endif /* MCUCONF_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -106,7 +106,6 @@
 | 
			
		|||
#define RP_USB_USE_USBD0                    TRUE
 | 
			
		||||
#define RP_USB_FORCE_VBUS_DETECT            TRUE
 | 
			
		||||
#define RP_USE_EXTERNAL_VBUS_DETECT         FALSE
 | 
			
		||||
#define RP_USB_USE_SOF_INTR                 TRUE
 | 
			
		||||
#define RP_USB_USE_ERROR_DATA_SEQ_INTR      FALSE
 | 
			
		||||
 | 
			
		||||
#endif /* MCUCONF_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,3 @@ void __early_init(void) {
 | 
			
		|||
void boardInit(void) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void restart_usb_driver(USBDriver *usbp) {
 | 
			
		||||
  // Do nothing. Restarting the USB driver on these boards breaks it.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -80,7 +80,3 @@ void __early_init(void) {
 | 
			
		|||
void boardInit(void) {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void restart_usb_driver(USBDriver *usbp) {
 | 
			
		||||
  // Do nothing. Restarting the USB driver on these boards breaks it.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -144,8 +144,3 @@ void __early_init(void) {
 | 
			
		|||
 * @todo    Add your board-specific code, if any.
 | 
			
		||||
 */
 | 
			
		||||
void boardInit(void) {}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void restart_usb_driver(USBDriver *usbp) {
 | 
			
		||||
    // Do nothing. Restarting the USB driver on these boards breaks it.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_5/board.mk
 | 
			
		||||
 | 
			
		||||
# List of all the board related files.
 | 
			
		||||
BOARDSRC += $(BOARD_PATH)/board/extra.c
 | 
			
		||||
BOARDSRC +=
 | 
			
		||||
 | 
			
		||||
# Required include directories
 | 
			
		||||
BOARDINC += $(BOARD_PATH)/board
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
#include <hal.h>
 | 
			
		||||
 | 
			
		||||
void restart_usb_driver(USBDriver *usbp) {
 | 
			
		||||
    // Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
 | 
			
		||||
    // resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
 | 
			
		||||
    // does not actually produce any keypresses until you un-plug and re-plug.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,7 +1,7 @@
 | 
			
		|||
include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_3_6/board.mk
 | 
			
		||||
 | 
			
		||||
# List of all the board related files.
 | 
			
		||||
BOARDSRC += $(BOARD_PATH)/board/extra.c
 | 
			
		||||
BOARDSRC +=
 | 
			
		||||
 | 
			
		||||
# Required include directories
 | 
			
		||||
BOARDINC += $(BOARD_PATH)/board
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,7 +0,0 @@
 | 
			
		|||
#include <hal.h>
 | 
			
		||||
 | 
			
		||||
void restart_usb_driver(USBDriver *usbp) {
 | 
			
		||||
    // Do nothing. Restarting the USB driver on the Teensy 3.6 breaks it,
 | 
			
		||||
    // resulting in a keyboard which can wake up a PC from Suspend-to-RAM, but
 | 
			
		||||
    // does not actually produce any keypresses until you un-plug and re-plug.
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +106,6 @@
 | 
			
		|||
#define RP_USB_USE_USBD0                    TRUE
 | 
			
		||||
#define RP_USB_FORCE_VBUS_DETECT            TRUE
 | 
			
		||||
#define RP_USE_EXTERNAL_VBUS_DETECT         FALSE
 | 
			
		||||
#define RP_USB_USE_SOF_INTR                 TRUE
 | 
			
		||||
#define RP_USB_USE_ERROR_DATA_SEQ_INTR      FALSE
 | 
			
		||||
 | 
			
		||||
#endif /* MCUCONF_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,6 +42,7 @@ void suspend_wakeup_init(void) {
 | 
			
		|||
    clear_keys();
 | 
			
		||||
#ifdef MOUSEKEY_ENABLE
 | 
			
		||||
    mousekey_clear();
 | 
			
		||||
    mousekey_send();
 | 
			
		||||
#endif /* MOUSEKEY_ENABLE */
 | 
			
		||||
#ifdef PROGRAMMABLE_BUTTON_ENABLE
 | 
			
		||||
    programmable_button_clear();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue