Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor10466851046685 SD/MMC CardMode BSP Overview Anchor10589861058986A BSP is required so that the SD/MMC cardmode driver will work on a particular system. The functions shown in the table below must be implemented. Pleaser refer to section C-5 “SDSD/MMC Cardmode BSP” on page 425 BSP for the details about implementing your own BSP. Anchor10590511059051  

Function Description1059060
HTML Table
summary
classPlain_Table
Table Row (tr)
Table Cell (td)
Anchor
10590561059056
Table Cell (td)
Anchor
10590581059058
Table Row (tr)
Table Cell (td)
Anchor
1059060
Panel


Function

Description

FSDev_SD_Card_BSP_Open()

Table Cell (td)
Anchor
10590621059062

Open (initialize) SD/MMC card interface.

Table Row (tr) Table Cell (td) Anchor10590641059064

FSDev_SD_Card_BSP_Close()

td

Anchor10590661059066

Close (uninitialize) SD/MMC card interface.

Table Row (tr) Table Cell (td)anchor1059068

1059068

FSDev_SD_Card_BSP_Lock()

Table Cell (td) Anchor10590701059070

Acquire SD/MMC card bus lock.

tr

Table Cell (td) Anchor10590721059072

FSDev_SD_Card_BSP_Unlock()

Table Cell (td)anchor1059074

1059074

Release SD/MMC card bus lock.

Table Row (tr) Table Cell (td) Anchor10590761059076

FSDev_SD_Card_BSP_CmdStart()

Table Cell (td) Anchor10590781059078

Start a command.

Table Row (tr)td

Anchor10590801059080

FSDev_SD_Card_BSP_CmdWaitEnd()

Table Cell (td) Anchor10590821059082

Wait for a command to end and get response.

Table Row (tr) Table Cell (td)anchor1059084

1059084

FSDev_SD_Card_BSP_CmdDataRd()

Table Cell (td) Anchor10590861059086

Read data following command.

Table Row (tr)td

Anchor10590881059088

FSDev_SD_Card_BSP_CmdDataWr()

Table Cell (td) Anchor10590901059090

Write data following command.

Table Row (tr)td

Anchor10590921059092

FSDev_SD_Card_BSP_GetBlkCntMax()

Table Cell (td) Anchor1059094

1059094

Get max block count.

Table Row (tr) Table Cell (td)anchor1059096

1059096

FSDev_SD_Card_BSP_GetBusWidthMax()

td

Anchor10590981059098

Get maximum bus width, in bits.

tr

Table Cell (td) Anchor10591001059100

FSDev_SD_Card_BSP_SetBusWidth()

Table Cell (td) Anchor10591021059102

Set bus width.

tr

Table Cell (td) Anchor10591041059104

FSDev_SD_Card_BSP_SetClkFreq()

Table Cell (td) Anchor10591061059106

Set clock frequency.

Table Row (tr)td

Anchor10591081059108

FSDev_SD_Card_BSP_SetTimeoutData()

td

Anchor10591101059110

Set data timeout.

tr

Table Cell (td) Anchor10591121059112

FSDev_SD_Card_BSP_SetTimeoutResp()

Table Cell (td) Anchor10591141059114

Set response timeout

...

...



...

Anchor10467031046703The Open()/Close() functions are called upon open/close or medium change; these calls are always matched. The status and information functions (GetBlkCntMax(), GetBusWidthMax(), SetBusWidth(), SetClkFreq(), SetTimeoutData(), SetTimeoutResp()) help configure the new card upon insertion. Lock() and Unlock() surround all card accesses. Anchor10467041046704

The remaining functions (CmdStart(), CmdWaitEnd(), CmdDataRd(), CmdDataWr()) constitute the command execution state machine (see Figure 12Figure - 9Command execution). A return error from one of the functions will abort the state machine, so the requisite considerations, such as preparing for the next command or preventing further interrupts, must be first handled. Anchor10542511054251 Image Removed

...

Panel

Image Added