2021-10-22 09:35 AM
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
2021-10-22 12:20 PM
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
2021-10-23 06:05 AM
Valuable input, thanks.
2021-10-26 05:39 PM
I removed the best answer flag because while the information was useful, it did not answer the original question. That is still unanswered.