diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-27 22:27:03 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-27 22:27:03 +0000 |
commit | 064743fe725c55b992d12f00c852dcda395c1808 (patch) | |
tree | 76501790a65b05b368adffe412411bb5a7435e96 /nuttx/arch | |
parent | 018beb7f1b41d99bdc728eade6d039ae3c1cc9c1 (diff) | |
download | px4-firmware-064743fe725c55b992d12f00c852dcda395c1808.tar.gz px4-firmware-064743fe725c55b992d12f00c852dcda395c1808.tar.bz2 px4-firmware-064743fe725c55b992d12f00c852dcda395c1808.zip |
Some STM32 USB OTG FS driver fixes
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5059 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_otgfshost.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_otgfshost.c b/nuttx/arch/arm/src/stm32/stm32_otgfshost.c index 61f2640d4..ce0e9036e 100644 --- a/nuttx/arch/arm/src/stm32/stm32_otgfshost.c +++ b/nuttx/arch/arm/src/stm32/stm32_otgfshost.c @@ -48,6 +48,10 @@ #include <errno.h> #include <debug.h> +#if !defined(CONFIG_DEBUG_VERBOSE) && !defined(CONFIG_DEBUG_USB) +# include <debug.h> +#endif + #include <nuttx/arch.h> #include <nuttx/kmalloc.h> #include <nuttx/usb/usb.h> @@ -1888,7 +1892,7 @@ static void stm32_gint_connected(FAR struct stm32_usbhost_s *priv) if (!priv->connected) { /* Yes.. then now we are connected */ - + ullvdbg("Connected\n"); priv->connected = true; DEBUGASSERT(priv->smstate == SMSTATE_DETACHED); @@ -3595,8 +3599,19 @@ static int stm32_transfer(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep, } } + /* There is a bug in the code at present. With debug OFF, this driver + * overruns the typical FLASH device and there are many problems with + * NAKS sticking a big delay here allows the driver to work but with + * very poor performance when debug is off. + */ + +#if !defined(CONFIG_DEBUG_VERBOSE) && !defined(CONFIG_DEBUG_USB) +#warning "REVISIT this delay" + usleep(100*1000); +#endif + /* Start the transfer */ - + stm32_transfer_start(priv, chidx); /* Wait for the transfer to complete and get the result */ @@ -3696,7 +3711,7 @@ static void stm32_portreset(FAR struct stm32_usbhost_s *priv) * Flush the selected Tx FIFO. * * Input Parameters: - * priv -- USB host driver private data structure. + * txfnum -- USB host driver private data structure. * * Returned Value: * None. |