Azure USBX storage / fileX / ramdisk: how to make windows reload the content of the device?
Hello Everyone:
I use azure RTOS USBX storage (MSC) and FileX.. My STM32H735 acts as a USB storage device using a RAM-Disk. I have FileX running, which allows me to add files to the RAM-Disk from inside the STM32H735
Problem: Windows caches the content of the RAM disk. Once I add a file from within STM32, windows does not detect that.
What do I have to do, to make windows re-load the content of the storage device?
Unplugging USB is not a solution
There is USBD_Storage_Status, which is used to return SCSI sense codes
I tried multiple like 0x02 0x28 0x00 (device not ready, medium might have changed)
If I start with this status, windows properly detects, that there is no medium in the device and says "please insert medium"
If I switch to the sens code 00: NO SENSE (all fine), windows properly loads the content of the drive.
But if I switch back to "no medium", windows still keeps the drive content in a cache.
How to force windows to reload?
Disabling USB and re-enabling USB might help, but I have a multi endpoint USB (Mass storage and CDC_ACM). I don't want to disable USB completely
Maybe there is an example out there for a mass storage with a removable medium.
Thank your for your help
Johannes
