Skip to main content
Graduate
February 17, 2024
Solved

Stm32f103 + W25q64 as mass storage device not working

  • February 17, 2024
  • 3 replies
  • 1736 views

Hi,

Im using stm32f103c8t6 along with w25q64 spi flash memory. I'm trying to do with this as a mass storage device but it is not working please help me with this.

    This topic has been closed for replies.
    Best answer by KDJEM.1

    Hello @Rithick_13 and welcome to the Community :),

    About the "usb was not recognized." issue could you please try to Increase Heap Size. For that, please take a look to this FAQ: USB device not recognized - STMicroelectronics Community may help you!

    Thank you.

    Kaouthar

     

    3 replies

    Graduate
    February 17, 2024

    What did you do so far and what problem are you facing?

    Graduate
    February 17, 2024

    we enabled the usb mass storage device initially we tried to RAM as a mass storage device with stm32f407vgt6 that was working, then internal flash memory with stm32f407vgt6 this also working. but with external spi flash was not working. With same process we tested with stm32f103c8t6 it was showing usb was not recognized.

    KDJEM.1Answer
    Technical Moderator
    February 20, 2024

    Hello @Rithick_13 and welcome to the Community :),

    About the "usb was not recognized." issue could you please try to Increase Heap Size. For that, please take a look to this FAQ: USB device not recognized - STMicroelectronics Community may help you!

    Thank you.

    Kaouthar

     

    Graduate II
    February 20, 2024

    For USB-MSC or FatFS you'd want to be using 4KB Sectors.

    The write sector functionality would require a 4KB erase, and then multiple 256-byte page writes to the NOR Flash

    16 x 256 = 4096

    For MSC you'd want to look at the INQUIRY, MODE PAGE, GET CAPACITY, READ and WRITE commands.