cancel
Showing results for 
Search instead for 
Did you mean: 

Using USB HAL for MSC with multiple access to storage

Sid Price
Senior

I am working on a design using STM32L433 as a composite USB (CDC and MSC) device using the STM32L4xx HAL and FreeRTOS. I have the device enumerating and I now need to add access to the storage medium (eMMC). The challenge I am facing is that the device needs read/write access to the eMMC as well as the USB MSC HAL.

I would like to use a storage access task to manage the eMMC access. To do this I would need to transfer some of the USB HAL code to a FreeRTOS task. Has anyone done anything similar and be willing share experiences.

It seems that moving the SCSI_ProcessRead and SCSI_ProcessWrite to the task may be one way of doing this.

Comments?

Sid

3 REPLIES 3

The general challenge when having two systems interact is coherency and the Windows system tendency to cache and do lazy writes.

Throwing NOT READY, or MEDIA CHANGED type sense codes is one way to manage this when you know you have USB connectivity

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Valuable input, thanks.

I removed the best answer flag because while the information was useful, it did not answer the original question. That is still unanswered.