mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
LPC31 EHCI: Seems to work after re-ordering some initialization logic
This commit is contained in:
parent
5fb0062d2d
commit
afb0209207
2 changed files with 16 additions and 1 deletions
|
|
@ -4307,7 +4307,7 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
|||
* SLOM Not used in host mode.
|
||||
* SDIS = 1, Stream disable mode. Eliminates overruns/underruns at
|
||||
* the expense of some performance.
|
||||
* VBPS = 1, off chip power source
|
||||
* VBPS = 1, off-chip power source
|
||||
*/
|
||||
|
||||
putreg32(USBHOST_USBMODE_CMHOST | USBHOST_USBMODE_SDIS | USBHOST_USBMODE_VBPS,
|
||||
|
|
@ -4323,6 +4323,14 @@ FAR struct usbhost_connection_s *lpc31_ehci_initialize(int controller)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Re-program the USB host controller. As implemented, lpc31_reset()
|
||||
* requires the host mode setup in order to work. However, we lose the
|
||||
* host configuration in the reset.
|
||||
*/
|
||||
|
||||
putreg32(USBHOST_USBMODE_CMHOST | USBHOST_USBMODE_SDIS | USBHOST_USBMODE_VBPS,
|
||||
LPC31_USBDEV_USBMODE);
|
||||
|
||||
/* "In order to initialize the host controller, software should perform the
|
||||
* following steps:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -686,3 +686,10 @@ Configurations
|
|||
Application Configuration -> System Add-Ons
|
||||
CONFIG_SYSTEM_USBMONITOR=y
|
||||
CONFIG_SYSTEM_USBMONITOR_INTERVAL=1
|
||||
|
||||
NOTE: I have found that if you enable USB DEBUG and/or USB tracing,
|
||||
the resulting image requires to much memory to execute out of
|
||||
internal SRAM. I was able to get the configurations to run out of
|
||||
SRAM with debug/tracing enabled by carefully going through the
|
||||
configuration and reducing stack sizes, disabling unused OS features,
|
||||
disabling un-necessary NSH commands, etc.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue