2024-11-06 11:05 PM
I am working on a project to connect QSPI flash memory to a PC as a USB mass storage device (MSC) using USBX, FILEX, LVLX, and THREADX on an STM32. This setup should allow the QSPI flash to appear as a drive in Windows.
Previously, I successfully implemented a similar project using the MCU's internal RAM as the storage medium. However, after switching to QSPI flash, I encounter the error message: 'Please insert a disk into USB Drive' when connecting the device to a PC.
To debug this issue, I tested the QSPI flash read/write functionality using FILEX + LVLX + THREADX without USBX, and it worked perfectly. This suggests the problem lies in the integration with USB MSC.
I am including my code for review. Could anyone help identify any potential errors or missing steps in my implementation? Additionally, are there specific areas I should focus on to resolve this issue? Thank you.