AnsweredAssumed Answered

USB Host mass storage class : File not crated in 32Gb pendrive

Question asked by Shrikant Mane on Aug 19, 2017


I am facing issue with USB HOST in STM32F407VG Discovery board .


I want to create new folder and text file  in 32GB OTG pendirve which is connected to STM32F407 Discovery board.


USB Configuration:


2. Mass Storage device.

3. FATFS : USB Disk

Code is generated using STM32CubeMX 


In while(1) after USB detection , we called following API

1 . disk_initalize(0)--------  success

2.  f_mount (&fatfs, "0:", 0) --------------success


above two api gives status ok result.

but when we try to create file using f_open(&file, "hi.txt",,, FA_CREATE_ALWAS|) we get Disk error.