2 Replies Latest reply on Jul 21, 2019 7:46 PM by YuxianL_01

    USB Host demo of FM_PDL_2.0.1


      when i run the demo s6e2gm_usb_host on FM4_S6E2G-SERIES_PIONEER_KIT board, i meet a problem:


      I install a 2GB USB memory in CN14 on the KIT, it shows red led on the KIT which means fail to read USB memory.


      If i disconnect the USB memory, the program goes to endless loop.


      When i debug it further, I find the varible "bHostMassStorageConnected" modified when call the function "UsbHostMassStorage_CheckForCompletion", it result the endless loop in main function.


      So it is the problem, I can't find why.


        • 1. Re: USB Host demo of FM_PDL_2.0.1

          Hope you are referring to the steps mentioned in the kit user guide(https://www.cypress.com/file/279816/download )

          Do you see "test.txt" file in your USB memory?


          1. Power the FM4 S6E2G-Series Pioneer board from CN2 using a USB cable, see Figure 2-6.


          2. Open the project file in IAR Embedded Workbench or Keil µVision IDE from the following directory:

          IAR project: <user_directory>: \FM4 S6E2G-Series Pioneer Kit_Ver01\Firmware\Demo Projects\s6e2gm_adc\IAR\s6e2gm_usb_host.eww

          Keil project: <user_directory>: \FM4 S6E2G-Series Pioneer Kit_Ver01\Firmware \Demo Projects\s6e2gm_adc\ARM\s6e2gm_usb_host.uvprojx


          3. Build the project and download the code into the S6E2GM device.


          4. Insert a USB flash drive to USB port CN14. The Blue LED of LED4 will turn on while the drive is being read / written.


          5. If the file operation is successful, the Green LED of LED4 will turn on. If the file operation failed, the Red LED of LED4 will turn on. Remove the USB flash drive, LED4 will turn off.


          6. Remove the USB flash drive and connect it to a PC. You will see a file named test.txt on the flash drive.