Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


Loading

I want to implement FAT32 on FreeRTOS for USB OTG USB Memory.

Posted by kevinbescom on March 21, 2017

Hi everyone.

I want to implement FAT32 on FreeRTOS for USB OTG USB Memory. In my information, FreeRTOS have provided FAT32 with FreeRTOS Source Code. But it is only for RAM Media FAT32 not Flash Media FAT32. How to implement FAT32 for Flash Media?

Thank advance.

Kevin


I want to implement FAT32 on FreeRTOS for USB OTG USB Memory.

Posted by rtel on March 21, 2017

Just as TCP code is generic, but must be ported to an Ethernet controller, the FAT code is generic, but must be ported to the media that is going to store the file file system. Information on how to do this is provided on the following link: http://www.freertos.org/FreeRTOS-Plus/FreeRTOSPlusFAT/Creatingafilesystemmedia_driver.html


I want to implement FAT32 on FreeRTOS for USB OTG USB Memory.

Posted by kevinbescom on July 5, 2017

Below is SD Disk API from FreeRTOS. Can i use below for USB Stick like "FF_USBDiskDetect() with just porting for reading, writing, IOMan Initializing and DISK IO "?

BaseTypet FFSDDiskDetect( FFDiskt *pxDisk ); FFDiskt *FFSDDiskInit( const char *pcName ); BaseTypet FFSDDiskReinit( FFDiskt *pxDisk ); BaseTypet FFSDDiskUnmount( FFDiskt *pDisk ); BaseTypet FFSDDiskMount( FFDiskt *pDisk ); BaseTypet FFSDDiskDelete( FFDiskt *pDisk ); BaseTypet FFSDDiskShowPartition( FFDiskt *pDisk ); void FFSDDiskFlush( FFDiskt *pDisk ); BaseTypet FFSDDiskFormat( FFDiskt *pxDisk, BaseTypet aPart ); BaseTypet FFSDDiskInserted( BaseTypet xDriveNr ); FFIOManagert *sddiskioman( FFDisk_t *pxDisk );

Thank you

Kevin.


I want to implement FAT32 on FreeRTOS for USB OTG USB Memory.

Posted by rtel on July 5, 2017

I'm not sure I fully understand your question, but yes, you should be able to port to USB storage. It may be a little trickier than most port as you will need to start with a working USB stack with appropriate drivers.


I want to implement FAT32 on FreeRTOS for USB OTG USB Memory.

Posted by heinbali01 on July 5, 2017

I think that the documentation pointed-out by Richard is quite complete.

But the most important functions to be implemented are:

~~~ static int32t prvFFRead( uint8t *pucBuffer, uint32t ulSectorNumber, uint32t ulSectorCount, FFDiskt *pxDisk ); static int32t prvFFWrite( uint8t *pucBuffer, uint32t ulSectorNumber, uint32t ulSectorCount, FFDiskt *pxDisk ); ~~~

You'll bind the address of these functions to the so-called io-handler.

Note that these functions use sector numbers, not a byte offset.

For the other FF_SDDisk functions you can use the existing implementation in most cases.


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

Meet Richard Barry and learn about running FreeRTOS on RISC-V at FOSDEM 2019

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


Careers

FreeRTOS and other embedded software careers at AWS.



FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Renesas

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner