summaryrefslogtreecommitdiff
path: root/nuttx/configs/sam4e-ek
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-03-17 12:37:55 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-03-17 12:37:55 -0600
commitb0fee266be2bb28da0db2bbd935172a2d15a1b30 (patch)
tree6093185f3ea5c90480126c5a4ce31cd953d6e41e /nuttx/configs/sam4e-ek
parentcbbc9f47a8a5a7179ca5a1078585d3cc2a00d726 (diff)
downloadpx4-nuttx-b0fee266be2bb28da0db2bbd935172a2d15a1b30.tar.gz
px4-nuttx-b0fee266be2bb28da0db2bbd935172a2d15a1b30.tar.bz2
px4-nuttx-b0fee266be2bb28da0db2bbd935172a2d15a1b30.zip
SAM4E: Add USB full speed device (UDP) driver
Diffstat (limited to 'nuttx/configs/sam4e-ek')
-rw-r--r--nuttx/configs/sam4e-ek/include/board.h4
-rw-r--r--nuttx/configs/sam4e-ek/src/sam_usbdev.c18
2 files changed, 15 insertions, 7 deletions
diff --git a/nuttx/configs/sam4e-ek/include/board.h b/nuttx/configs/sam4e-ek/include/board.h
index 86415f6cd..bcd792819 100644
--- a/nuttx/configs/sam4e-ek/include/board.h
+++ b/nuttx/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/nuttx/configs/sam4e-ek/src/sam_usbdev.c b/nuttx/configs/sam4e-ek/src/sam_usbdev.c
index 947ccb13b..4fdd71902 100644
--- a/nuttx/configs/sam4e-ek/src/sam_usbdev.c
+++ b/nuttx/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);
}