diff --git a/configs/sam4e-ek/include/board.h b/configs/sam4e-ek/include/board.h index 86415f6cd7b..bcd79281926 100644 --- a/configs/sam4e-ek/include/board.h +++ b/configs/sam4e-ek/include/board.h @@ -108,8 +108,8 @@ * PMC USB register to provide the PLL clock. So in order to use the USB * feature, the PLL output must be a multiple of 48MHz. * - * PLLACK = 240MHz, USBDIV=5, USB_48M = 240 MHz / 5 = 48MHz - * PLLACK = 192MHz, USBDIV=4, USB_48M = 192 MHz / 4 = 48MHz + * PLLACK = 240MHz, USBDIV=4, USB_48M = 240 MHz / (4 + 1) = 48MHz + * PLLACK = 192MHz, USBDIV=5, USB_48M = 192 MHz / (3 + 1) = 48MHz */ #define BOARD_PMC_USBS (0) diff --git a/configs/sam4e-ek/src/sam_usbdev.c b/configs/sam4e-ek/src/sam_usbdev.c index 947ccb13b6b..4fdd719021d 100644 --- a/configs/sam4e-ek/src/sam_usbdev.c +++ b/configs/sam4e-ek/src/sam_usbdev.c @@ -92,17 +92,25 @@ int sam_usbpullup(FAR struct usbdev_s *dev, bool enable) } /************************************************************************************ - * Name: sam_usbsuspend + * Name: sam_udp_suspend * * Description: - * Board logic must provide the sam_usbsuspend logic if the USBDEV driver is + * Board logic must provide the sam_udp_suspend logic if the UDP driver is * used. This function is called whenever the USB enters or leaves suspend mode. - * This is an opportunity for the board logic to shutdown clocks, power, etc. - * while the USB is suspended. + * + * When 'resume' is false, this function call provides an opportunity to perform + * board-specific power-saving actions so that less power is consumed while the + * USB is suspended. + * + * Certain power-saving operations are performed by the UDP driver when it enters + * suspend mode: The USB device peripheral clocks are be switched off. MCK and + * UDPCK are switched off and the USB transceiver is disabled. + * + * When 'resume' is true, normal clocking and operations must all be restored. * ************************************************************************************/ -void sam_usbsuspend(FAR struct usbdev_s *dev, bool resume) +void sam_udp_suspend(FAR struct usbdev_s *dev, bool resume) { ulldbg("resume: %d\n", resume); }