MMC Card Reader Development

From OpenCircuits
(Difference between revisions)
Jump to: navigation, search
(Comparison of FatFs and stdio API)
Line 29: Line 29:
  
 
===Comparison of FatFs and stdio API===
 
===Comparison of FatFs and stdio API===
*to be added
+
*selected list is described below
 +
{| border="1" cellspacing="0" cellpadding="5"
 +
|+ Comparison between FatFs and stdio API
 +
! Function !! stdio.h !! FatFs !! Remarks
 +
|-
 +
| Open
 +
|
 +
  FILE *
 +
[http://www.cplusplus.com/reference/clibrary/cstdio/fopen/ fopen] (
 +
  const char * filename,
 +
  const char * mode
 +
 
 +
);
 +
|
 +
  FRESULT
 +
[http://elm-chan.org/fsw/ff/en/open.html f_open] (
 +
  FIL* FileObject,      /* Pointer to the blank file object structure */
 +
  const XCHAR* FileName, /* Pointer to the file neme */
 +
  BYTE ModeFlags        /* Mode flags */
 +
);
 +
|
 +
*'''FILE''' matches '''FIL'''
 +
*'''filename''' matches '''FileName'''
 +
*'''mode''' matches '''ModeFlags'''
 +
*stdio.h has no equivalent '''FRESULT'''
 +
|-
 +
| Read || 7.73 || 30 ||
 +
|-
 +
| Write || 7.85 || 30 ||
 +
|-
 +
| Close || 4.62 || 40 ||
 +
|-
 +
| Seek || 4.81 || 40 ||
 +
|-
 +
|}

Revision as of 19:57, 25 August 2009

This wiki describes the development of the MMC Card Reader Project

Contents

Architecture

  • See here for block diagram


Development Roadmap

Phase 1

  • Create stdio.h wrapper for file system in freertos_posix
  • Use existing I2C EEPROM driver for development

Phase 2

  • Circuit design for interfacing MMC

Phase 3

  • SPI driver for MMC

Phase 4

  • Test for normal read/write function
  • hotswap (should not hang or cause voltage dip)
  • multiple file read/write (protection)


Circuit and PCB


Software Implementation

Comparison of FatFs and stdio API

  • selected list is described below
Comparison between FatFs and stdio API
Function stdio.h FatFs Remarks
Open
 FILE * 

fopen (

 const char * filename, 
 const char * mode
 

);

 FRESULT 

f_open (

 FIL* FileObject,       /* Pointer to the blank file object structure */
 const XCHAR* FileName, /* Pointer to the file neme */
 BYTE ModeFlags         /* Mode flags */

);

  • FILE matches FIL
  • filename matches FileName
  • mode matches ModeFlags
  • stdio.h has no equivalent FRESULT
Read 7.73 30
Write 7.85 30
Close 4.62 40
Seek 4.81 40
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox