How do I inform the PC host that the directory contents have been update on a USB MSC device?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

Hi,

I've successfully have gotten my CY8CPROTO-062-4343W board configured as MSC device to work.  I'm using the MTB project "USB_Mass_Storage_File_System".

However, every time I record another sound file (rec_xxxx.raw), the PC host doesn't see it unless I either unplug the USB connection or perform a board RESET.

Is there a event signal I can send to the PC host to request a refresh of the cached directory info the PC host has?

I realize that, in general, it is assumed with the MSC device, the host has 100% control of the storage device.  It is not normally expected for the MSC device to "self-update" its contents.

Maybe there is an event packet to send the PC host to check if the directory has been corrupted?

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
1 Solution
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

You could send a signal to force the OS to re-enumerate the device. The code example has a function called "usb_comm_refresh()".

View solution in original post

2 Replies
RodolfoGL
Employee
Employee
250 solutions authored 250 sign-ins 5 comments on KBA

You could send a signal to force the OS to re-enumerate the device. The code example has a function called "usb_comm_refresh()".

Rodolfo,

Thank you.  That did the trick!   I placed it in the audio_fs_save().

Apparently it did not re-enumerate the MSC drive.  Had it re-enumerated, I would have heard the system host sound indicating it did.  However, it drop me back into the root directory of the MSC drive which was not quite what I hoped for.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes