Skip to main content
August 12, 2020
Question

[NOT Solved] F407 and SanDisk Cruzer Blade 16GB don't work (32GB work)

I tested 3 pendrives, 4GB (Samsung?), 16GB and 32GB (SanDisk Cruzer Blade).

​

Two worked on the STM32F407VG.

​

SD card adapter also doesn't work, 8GB (Kingston), 2GB (Generic), 16GB (Sandisk Ultra).

​

SanDisk Cruzer Blade 16GB don't work.

​

Using USB host with STM32CubeIDE 1.3 (Version 1.4 does not work with ST-Link V2 :expressionless_face:)

​

​In case anyone has problems with this, I leave it registered that it can be common.

​

All devices run on Windows 10 x64 and Android 10 (Smartphone).

​

This topic has been closed for replies.

19 replies

dbgarasiya
Senior
August 14, 2020

don't work means

showing wrong storage capacity or simply display that not recongnised ?

August 15, 2020

The term Does not work means that the automated program for writing to the USB stick has failed to perform the task.

Source: https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/STM32-USB-training.html

dbgarasiya
Senior
August 17, 2020

Have you configured below two files properly,

usbh_conf.c

usbh_diskio.c

August 17, 2020

Good question.

August 17, 2020
August 17, 2020
dbgarasiya
Senior
August 18, 2020

you have not configured VBUS pin

August 19, 2020

Thanks, yes I configured Vbus, this code is an example, and the IDE already suggests that this configuration be done.

dbgarasiya
Senior
August 19, 2020

I am sharing you my code which works for (STM32F779BI)

also write data to usbdisk

port it for your controller

August 19, 2020

Thanks,

I tried to make your example work with the F407, but it didn't work, the uC was unable to open the file "2019/jan/1/pendrive.txt".

So I adapted it with parts of another sample code, and it worked, the F407 was able to read and write all the devices, both pendrive and SD card with adapter.

Unfortunately my project that has several peripherals (RTC DS3231, ACC MPU6050, LCD ILI9341, USB HID, USB MSC) cannot work with the changes I found. I think I will have to create a new project with IDE 1.4.2 and build the project again.

At least now I know that the IDE works with USB Host MSC.

Thank you.

August 19, 2020

Note: ST-Link still does not work on Windows (STM32CubeIDE 1.4.2), I am using Linux Xubuntu now, I think it is much faster to compile.