diff options
Diffstat (limited to 'nuttx/configs/stm32f4discovery/README.txt')
-rwxr-xr-x | nuttx/configs/stm32f4discovery/README.txt | 70 |
1 files changed, 58 insertions, 12 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 |