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

Can RL_USB run together with FATFS?

Just like title show.

I just want to use FATFS_0.09 run together with rl_usb (not RL_FLASHFS).

any ideas?

or RL_FLASHFS support chinese file names??

Parents
  • > When I try to read data (more than one time) error happening.
    > I think that is because USB in busying status. right?

    No, usbh_msc_read() is a synchronous function. It doesn't return until the read operation finishes, or until some "physical" error occurs.
    Sound like the cause lives in elsewhere.

    Did you mount two drives simultaneously?
    Then, assign dedicated FATFS structure to each drive.

    static FATFS sFatFs0, sFatFs1;
    
    f_mount( 0, &sFatFs0 );
    f_mount( 1, &sFatFs1 );
    

    If you would open two files together, assign dedicated FIL structure to each file.

    static FIL fileObj0, fileObj1;
    
    f_open( &fileObj0, "src.txt", FA_READ );
    f_open( &fileObj1, "dst.txt", FA_WRITE );
    

    Tsuneo

Reply
  • > When I try to read data (more than one time) error happening.
    > I think that is because USB in busying status. right?

    No, usbh_msc_read() is a synchronous function. It doesn't return until the read operation finishes, or until some "physical" error occurs.
    Sound like the cause lives in elsewhere.

    Did you mount two drives simultaneously?
    Then, assign dedicated FATFS structure to each drive.

    static FATFS sFatFs0, sFatFs1;
    
    f_mount( 0, &sFatFs0 );
    f_mount( 1, &sFatFs1 );
    

    If you would open two files together, assign dedicated FIL structure to each file.

    static FIL fileObj0, fileObj1;
    
    f_open( &fileObj0, "src.txt", FA_READ );
    f_open( &fileObj1, "dst.txt", FA_WRITE );
    

    Tsuneo

Children
  • Thanks Tsuneo!^_^

    system work well now! As you said!

    other question!

    (my project is STM32F207 WITH RL_USB + FATFS)

    can usb host (MSD project) read data from hard disk ( two or more logical partition)?

    set _MULTI_PARTITION == 0, just can read data from hard disk in main partition.

    set _MULTI_PARTITION == 1, use f_open to read a file, return error code

    FR_NO_FILESYSTEM,               /* (13) There is no valid FAT volume */
    

    my open file function is

    res = f_open(&fsrc, "2:/STM32.TXT", FA_OPEN_EXISTING | FA_READ);
    


    more ideas for _MULTI_PARTITION == 1??

  • You do know that FatFS has an online user manual, right? I used it extensively, and guess what I did not forget to mount my drives....