This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FILE SYSTEM WITH USB HOST FAILS WITH STM32F107

Hello I have been debugging for one week and it drives me crazy ;
I am using the file system library ; I could make it work ok with SD card but now my problem is a usb host

the only diffirent of my board from MCBSTM32C is that power control is GPIOB.15

I have changed that in the code of the MSD_file example and i can control the host power

but the problem that the software always turn back that the device is not connected .

after debugging I noticed that usbh_msc_status(0, 0) always retun false ; I am using 4GB USB flash .

my program is just to create a TXT file inside the usb flash ; I am afraid it is a library bug ; so anyone has this problem before?

Thank you in advanced

Regards
Sami

  • Sami,

    I have the very same problem, but with STM32F105. When I use ST's USB stack my board works fine. But when I use Keil's MSC application (V4.50) it fails to connect. Until now I got no response from Keil's support.

    Regards,

    Paulo

  • You have changed functions: USBH_STM32_Pins_Config (BOOL on) USBH_STM32_Port_Power (BOOL on)

    to fit different pin that you are using?
    And it does not work?

    Did you try any other combinations for example did you try original example on the original MCBSTM32C board, did you try to connect PC9 instead of PB.15 on your board and try original example?

    Previous tests should help a bit to determine where the problem is.

  • wild,

    Thank you for your repply. I'm using the same pin config and the original MCBSTM32C example. My remark is: why USBH_STM32_Port_Power() function is called by Keil's library, but USBH_STM32_Pins_Config() isn't? It's never called. This is insane. And why USBH_STM32_Init() is called several times? It seems that there's something wrong with usbh0_hcd functions. If I change to ST's USB host library I can read the attached pendrive. So, I think hardware is ok.

    Regards,

    Paulo

  • Hi,

    are you using latest MDK release v4.54?
    Can you try original example on your board with changed pin anyways?