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 | |
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')
-rw-r--r-- | nuttx/ChangeLog | 2 | ||||
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_otgfshost.c | 21 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/dhcpd/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/nettest/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/nsh/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/nsh2/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/ostest/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm3220g-eval/telnetd/defconfig | 2 | ||||
-rw-r--r-- | nuttx/fs/romfs/fs_romfsutil.c | 2 |
10 files changed, 28 insertions, 11 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 192af9dc3..eff224f79 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3200,4 +3200,6 @@ OFF, there are more NAKs occuring in more places than before and this reveals a variety of errors. This check in improves NAK robustness for control transfers but does not resolve all of the issues. + * configs/stm3220g-eval/*/defconfig: Calibrated delay loop. It had + never been calibrated was was way off. 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. diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig index 27b618007..7a211ddc9 100644 --- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig +++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig index 1c5889e90..ade4bbe97 100644 --- a/nuttx/configs/stm3220g-eval/nettest/defconfig +++ b/nuttx/configs/stm3220g-eval/nettest/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig index 1fe481606..58b47b3d7 100644 --- a/nuttx/configs/stm3220g-eval/nsh/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig index 0b157f91f..13f729257 100644 --- a/nuttx/configs/stm3220g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig @@ -76,7 +76,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig index fec79bd9f..8d9799745 100644 --- a/nuttx/configs/stm3220g-eval/nxwm/defconfig +++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig index 5d1d0e5e4..0cb5f37f0 100644 --- a/nuttx/configs/stm3220g-eval/ostest/defconfig +++ b/nuttx/configs/stm3220g-eval/ostest/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig index 5b0157c41..d8b360887 100644 --- a/nuttx/configs/stm3220g-eval/telnetd/defconfig +++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig @@ -75,7 +75,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32F207IG=y CONFIG_ARCH_BOARD="stm3220g-eval" CONFIG_ARCH_BOARD_STM3220G_EVAL=y -CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BOARD_LOOPSPERMSEC=10926 CONFIG_DRAM_SIZE=0x00030000 CONFIG_DRAM_START=0x20000000 CONFIG_ARCH_IRQPRIO=y diff --git a/nuttx/fs/romfs/fs_romfsutil.c b/nuttx/fs/romfs/fs_romfsutil.c index ec009da89..cb3f9f9ac 100644 --- a/nuttx/fs/romfs/fs_romfsutil.c +++ b/nuttx/fs/romfs/fs_romfsutil.c @@ -351,7 +351,7 @@ static inline int romfs_searchdir(struct romfs_mountpt_s *rm, } while (next != 0); - /* There is nothing in this directoy with that name */ + /* There is nothing in this directory with that name */ return -ENOENT; } |