This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

A question about csl_usb_msc_fullspeed_example.c

Other Parts Discussed in Thread: TMS320C5515

EVM : TMS320C5515

example code:c55_csl_3.03 , csl_usb_msc_fullspeed_example.c

I want to program some code when MSC is processing done and PC is showing the folder.

Which location is a appropriate for the requirement?

  • Add question 2 as below:

    USB dis-connect from PC -> MSC TSK end -> Program some code.

    Which location is a appropriate for programming code , USB disconnect from PC.

    *** These program cannot affect USB flow chart. ***

  • There is no specific location which indicates that host has completed the MSC processing and drive has shown up on the host PC.

    During normal MSC processing(which starts after successful enumeration), host reads FAT information from the storage media to determine the file system type, structure and contents of the media. MSC processing will be completed and drive will be up on host once the FAT reading is completed. You may track the read operations to decide if MSC processing is completed.

    When USB is disconnected from PC, USB main task checks for the re-connect in a while loop. You may add your code before entering this while loop. Please check for below condition in MainTask() function.

    if((usbDevDisconnect == TRUE) &&
    (CSL_FEXT(usbRegisters->DEVCTL, USB_DEVCTL_VBUS) !=
    CSL_USB_DEVCTL_VBUS_ABOVEVBUSVALID))

    - Pratap.