Question
STM32F411 USB MSC (host) OTG flash drive problem
Hi,
Im developing a logger device with STM32F411CC processor. I use the latest Cube, DFP, Keil etc. I would like to use the USB to log datas to a flash drive. I developed a prototype software with an older usb msc host example and it worked on a F4 discovery board.
Now i have the new hardware and i have several questions.
The newest generated code's strusture was a bit different from the old one but it won't the problem.
- If i use an I2C device to enable the OTG voltage the cube won't generate it in the init section(won't call the MX_I2C1_Init()). - OK FIXED
- Misstyped comment on MX_DriverVbusFS() function, 1 parameter should have a meaning to switch on the USB voltage. The code call it at start with TRUE(1) parameter, but comment shows: 1 : VBUS Inactive - OK FIXED
- After several tries to log the file (what was worked in the old code with 407) something is changed in the USBH_UserProcess() function. Now its only working when i call the writeout in READY state (at the past worked in START state) - OK its not a problem its logical.
- After everything is working fine i just realised if i disconnect and connect back the flash drive several times it freezes down. After 7-8 tries. Sometimes it recovers back in a long time, but the driver switch off the VUSB voltage and doesn't switch it back! How can i fix it? I added some vusb forcing code(it tries to switch back the VUSB after a second) and it works better, but i think the problem is not this.
- When i have to use reenumeration?
Thanks a lot!
Bests
Attila
