ma_allam9009@yahoo.com [nuttx]
2016-11-17 09:45:29 UTC
Hello,
I'm using Nuttx version 7.17 for a project that needs the atmel same70 board to act as a mass storage device.
am using memory card which mounts correctly to /dev/mmcsd0. i used the menuconfig to configure the nuttx to
1- use the USBHS peripheral
2- i enabled the use of D-Cache write through
3- in USB High Speed Device Controller driver (DCD) options i only modified the Pre-allocate DMA transfer descriptors to 32 as mentioned in README doc and enabled the EP7 DMA errata workaround
4- in the USB Device Driver Support i chose to Enable high and full speed as msc use bulk transfer type
5- Enabled DMA methods and Board DMA Allocation Hooks
6- finally i enabled the USB Mass storage class device and increased the Bulk IN and OUT request size to 512
then configured the MSC Nuttx-Shell Commands (msconn and msdis)
i also added a file sam_usbmsc.c in /nuttx/configs/same70-xplained/src/ with a function do nothing called board_usbmsc_initialize() because the the memory card has been already initialized by the system.
The Problem is:
when i type the command msconn to nsh the windows detect the usb and HANG FOR LONG TIME a couple of minutes configured it as mass storage device then HANG again then configure it as Disk then HANG again for a longer period to open the memory card in explorer window the whole process takes up to 15 minutes maybe more to open the memory card and show its files
when i checked the events tab from the disk properties in the device manager of the windows, i saw that the windows keeps staring the device the configure then delete it !.
so what is the solution for this problem?
Note i tried to configure the usb as a CDC/ACM and it works that the windows configured it and gave it a COM to communicate through.
I'm using Nuttx version 7.17 for a project that needs the atmel same70 board to act as a mass storage device.
am using memory card which mounts correctly to /dev/mmcsd0. i used the menuconfig to configure the nuttx to
1- use the USBHS peripheral
2- i enabled the use of D-Cache write through
3- in USB High Speed Device Controller driver (DCD) options i only modified the Pre-allocate DMA transfer descriptors to 32 as mentioned in README doc and enabled the EP7 DMA errata workaround
4- in the USB Device Driver Support i chose to Enable high and full speed as msc use bulk transfer type
5- Enabled DMA methods and Board DMA Allocation Hooks
6- finally i enabled the USB Mass storage class device and increased the Bulk IN and OUT request size to 512
then configured the MSC Nuttx-Shell Commands (msconn and msdis)
i also added a file sam_usbmsc.c in /nuttx/configs/same70-xplained/src/ with a function do nothing called board_usbmsc_initialize() because the the memory card has been already initialized by the system.
The Problem is:
when i type the command msconn to nsh the windows detect the usb and HANG FOR LONG TIME a couple of minutes configured it as mass storage device then HANG again then configure it as Disk then HANG again for a longer period to open the memory card in explorer window the whole process takes up to 15 minutes maybe more to open the memory card and show its files
when i checked the events tab from the disk properties in the device manager of the windows, i saw that the windows keeps staring the device the configure then delete it !.
so what is the solution for this problem?
Note i tried to configure the usb as a CDC/ACM and it works that the windows configured it and gave it a COM to communicate through.