diff options
author | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-29 19:38:53 +0000 |
---|---|---|
committer | patacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679> | 2012-08-29 19:38:53 +0000 |
commit | 0461afd2d120e9b76a904a868c5f4d78f2344e22 (patch) | |
tree | d83ddaac09e30ea0e9277354e7b39547314bc6ff /nuttx/configs/stm32f4discovery | |
parent | 7d834ad641ad6c35a3561596f56860ae214994ae (diff) |
The USB host driver has been verified on the STM32F4Discovery
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5067 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/configs/stm32f4discovery')
-rwxr-xr-x | nuttx/configs/stm32f4discovery/README.txt | 70 | ||||
-rw-r--r-- | nuttx/configs/stm32f4discovery/nsh/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm32f4discovery/nxlines/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm32f4discovery/ostest/defconfig | 2 | ||||
-rw-r--r-- | nuttx/configs/stm32f4discovery/pm/defconfig | 2 |
5 files changed, 62 insertions, 16 deletions
diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt index c2a269de30..93b8fee038 100755 --- a/nuttx/configs/stm32f4discovery/README.txt +++ b/nuttx/configs/stm32f4discovery/README.txt @@ -906,7 +906,7 @@ STM32F4Discovery-specific Configuration Options want to do that? CONFIG_STM32_USBHOST_REGDEBUG - Enable very low-level register access debug. Depends on CONFIG_DEBUG. - CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB + CONFIG_STM32_USBHOST_PKTDUMP - Dump all incoming and outgoing USB packets. Depends on CONFIG_DEBUG. Configurations @@ -1066,19 +1066,65 @@ Where <subdir> is one of the following: you can still use certain kinds of debug output (see include/debug.h, all of the interfaces based on lib_lowprintf will work in this configuration). - 8. USB OTG FS Device or Host Support + 6. USB OTG FS Host Support. The following changes will enable support for + a USB host on the STM32F4Discovery, including support for a mass storage + class driver: - CONFIG_USBDEV - Enable USB device support, OR - CONFIG_USBHOST - Enable USB host support (but not both) + CONFIG_USBDEV=n - Make sure tht USB device support is disabled + CONFIG_USBHOST=y - Enable USB host support + CONFIG_STM32_OTGFS=y - Enable the STM32 USB OTG FS block + CONFIG_STM32_SYSCFG=y - Needed for all USB OTF FS support + CONFIG_SCHED_WORKQUEUE=y - Worker thread support is required for the mass + storage class driver. + CONFIG_NSH_ARCHINIT=y - Architecture specific USB initialization + is needed for NSH + CONFIG_FS_FAT=y - Needed by the USB host mass storage class. + + With those changes, you can use NSH with a FLASH pen driver as shown + belong. Here NSH is started with nothing in the USB host slot: + + NuttShell (NSH) NuttX-x.yy + nsh> ls /dev + /dev: + console + null + ttyS0 + + After inserting the FLASH drive, the /dev/sda appears and can be + mounted like this: + + nsh> ls /dev + /dev: + console + null + sda + ttyS0 + nsh> mount -t vfat /dev/sda /mnt/stuff + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + + And files on the FLASH can be manipulated to standard interfaces: + + nsh> echo "This is a test" >/mnt/stuff/atest.txt + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + -rw-rw-rw- 16 atest.txt + nsh> cat /mnt/stuff/atest.txt + This is a test + nsh> cp /mnt/stuff/filea.c fileb.c + nsh> ls /mnt/stuff + /mnt/stuff: + -rw-rw-rw- 16236 filea.c + -rw-rw-rw- 16 atest.txt + -rw-rw-rw- 16236 fileb.c + + To prevent data loss, don't forget to un-mount the FLASH drive + before removing it: + + nsh> umount /mnt/stuff - CONFIG_STM32_OTGFS - Enable the STM32 USB OTG FS block - CONFIG_STM32_SYSCFG - Needed for all USB OTF FS support - - CONFIG_SCHED_WORKQUEUE - Worker thread support is required for the mass - storage class (both host and device). - CONFIG_NSH_ARCHINIT - Architecture specific USB initialization - is needed - nxlines: ------ An example using the NuttX graphics system (NX). This example focuses on diff --git a/nuttx/configs/stm32f4discovery/nsh/defconfig b/nuttx/configs/stm32f4discovery/nsh/defconfig index dede37af15..69d4e717cf 100644 --- a/nuttx/configs/stm32f4discovery/nsh/defconfig +++ b/nuttx/configs/stm32f4discovery/nsh/defconfig @@ -488,7 +488,7 @@ CONFIG_FDCLONE_DISABLE=n CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=n -CONFIG_SCHED_WORKPRIORITY=50 +CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 5bcfeec822..0e006f4a58 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -488,7 +488,7 @@ CONFIG_FDCLONE_DISABLE=n CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=n -CONFIG_SCHED_WORKPRIORITY=50 +CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index 438694af2f..dfdea14d5d 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -461,7 +461,7 @@ CONFIG_FDCLONE_DISABLE=n CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=n -CONFIG_SCHED_WORKPRIORITY=50 +CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 diff --git a/nuttx/configs/stm32f4discovery/pm/defconfig b/nuttx/configs/stm32f4discovery/pm/defconfig index 58b7df7cba..799eea34cc 100644 --- a/nuttx/configs/stm32f4discovery/pm/defconfig +++ b/nuttx/configs/stm32f4discovery/pm/defconfig @@ -489,7 +489,7 @@ CONFIG_FDCLONE_DISABLE=n CONFIG_FDCLONE_STDIO=n CONFIG_SDCLONE_DISABLE=y CONFIG_SCHED_WORKQUEUE=y -CONFIG_SCHED_WORKPRIORITY=50 +CONFIG_SCHED_WORKPRIORITY=192 CONFIG_SCHED_WORKPERIOD=50000 CONFIG_SCHED_WORKSTACKSIZE=1024 CONFIG_SIG_SIGWORK=4 |