cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F767 – USB Host FatFS works on FS but not on HS (internal FS PHY)

MADHU2
Associate II

Hi,

I'm using an STM32F767 with both USB OTG FS and HS in Host mode.

  • FS is working fine with USB MSC + FatFS, and I can create files on a USB stick.

  • HS is set to use internal FS PHY (no external ULPI). It detects the pendrive (HOST_USER_CLASS_ACTIVE), but FatFS fails to create/open any file (f_mount or f_open returns FR_DISK_ERR).

This happens in both bare-metal and FreeRTOS.
If I disable FS, HS works fine. But when both are active, only FS works for file ops.

 

Is there any way to get FS and HS USB MSC + FatFS working together when HS uses internal FS PHY?

Any example or suggestion to fix this dual-port issue would be invaluable.

Thanks!

12 REPLIES 12

Hi @Ghofrane,

Thank you so much for the information! I would really appreciate it if you could take care of this as soon as possible so that I can start my development. Looking forward to your help!

@Ghofrane GSOURI  suggested that the issue is with FatFS - so maybe you could try asking on the FatFS forum:

https://elm-chan.org/fsw/ff/bd/

 

Have you checked if there's anything in the list of configuration options: https://elm-chan.org/fsw/ff/doc/config.html ?

 

Other filesystems are available ...

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yes, thank you. I will check the FatFS forum as suggested.

If possible, could you also please share any document, example, or working solution
that demonstrates how to handle this issue (using both FS and HS USB, or switching
between them)?

That would be very helpful.

Thanks again!