cancel
Showing results for 
Search instead for 
Did you mean: 

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

Shrikant Mane
Associate
Posted on August 19, 2017 at 14:16

Hi,

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:

1. USB HOST

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.

#mass-storage-device #stm32f4 #usb-host #f_open
0 REPLIES 0