MCUXpresso SDK Documentation

sdio_freertos

sdio_freertos#

Overview#

The FREERTOS SDIO project is a demonstration program that uses the SDK software. It reads/writes the SDIO card reigister. The purpose of this example is to show how to use SDio driver with freertos.

Supported Boards#

EVKB-IMXRT1050
Hardware requirements
  • Micro USB cable

  • evkbimxrt1050 board

  • Personal Computer

  • SDIO card(such as wifi card, we use ATHEROS AR6233X to test)

Board settings

Insert the sdio card into card slot. Note that sdcard connector is for micro sd,but sdio connector is normal one, so you need a connector converter to connect.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the LPC-Link USB port (J8) on the board.

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Reset the SoC and run the project.

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:


SDIO freertos example.

Card inserted.

Read function CIS, in direct way

Read function CIS, in extended way, non-block mode, non-word aligned size

Read function CIS, in extended way, block mode, non-word aligned size

The read content is consistent.

Input 'q' to quit card access task.

Input other char to access again.

If sdio card interrupt is generated, then more log will be generated like:


SDIO interrupt is received

SDIO Pending interrupt 0

EVK-MIMXRT595
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT595 board

  • Personal Computer

  • SDIO card

Board settings

Make sure resistors R691~R697 are populated and resistors R611~R620,R660, R661 are removed.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J40) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Note: The Rev.B. EVK board can not perform Card power reset due to board limitation. Please insert the SDIO card into card slot(J32) after the debug console print “Please insert a card into board.”

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:


SDIO freertos example.

Card inserted.

Card init finished, ready to access.

Read function CIS, in direct way

CIS read successfully

Please note that below log maybe printed according to the card capability.


Read function CIS, in extended way, non-block mode, non-word aligned size

Read function CIS, in extended way, block mode, non-word aligned size

The read content is consistent.

Input ‘q’ to quit card access task.

Input other char to access again.


If sdio card interrupt is generated, then more log will be generated like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SDIO interrupt is received

IO 1 interrupt detected.

If sdio card is not inserted before example run, then more log will generated like:

SDIO freertos example.

Please insert a card into board.
EVK-MIMXRT685
Hardware requirements
  • Micro USB cable

  • EVK-MIMXRT685 board

  • Personal Computer

  • SDIO card

Board settings

Note: If the sdio card need WL_REG_ON, please connect WL_REG_ON to JS14.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo. Please insert the SDIO card into card slot(J9)

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:


SDIO freertos example.

Card inserted.

Card init finished, ready to access.

Read function CIS, in direct way

CIS read successfully

Please note that below log maybe printed according to the card capability.


Read function CIS, in extended way, non-block mode, non-word aligned size

Read function CIS, in extended way, block mode, non-word aligned size

The read content is consistent.

Input ‘q’ to quit card access task.

Input other char to access again.


If sdio card interrupt is generated, then more log will be generated like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SDIO interrupt is received

IO 1 interrupt detected.

If sdio card is not inserted before example run, then more log will generated like:

SDIO freertos example.

Please insert a card into board.
MIMXRT685-AUD-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT685-AUD-EVK board

  • Personal Computer

  • SDIO card

Board settings

Note: If the sdio card need WL_REG_ON, please connect WL_REG_ON to JS14.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo. Please insert the SDIO card into card slot(J9)

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:


SDIO freertos example.

Card inserted.

Card init finished, ready to access.

Read function CIS, in direct way

CIS read successfully

Please note that below log maybe printed according to the card capability.


Read function CIS, in extended way, non-block mode, non-word aligned size

Read function CIS, in extended way, block mode, non-word aligned size

The read content is consistent.

Input ‘q’ to quit card access task.

Input other char to access again.


If sdio card interrupt is generated, then more log will be generated like:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SDIO interrupt is received

IO 1 interrupt detected.

If sdio card is not inserted before example run, then more log will generated like:

SDIO freertos example.

Please insert a card into board.
MIMXRT700-EVK
Hardware requirements
  • Micro USB cable

  • MIMXRT700-EVK board

  • Personal Computer

  • SDIO card

Board settings

JP65 1-2 connected.

Prepare the Demo
  1. Connect a micro USB cable between the PC host and the MCU-LINK USB port on the board

  2. Open a serial terminal with the following settings:

    • 115200 baud rate

    • 8 data bits

    • No parity

    • One stop bit

    • No flow control

  3. Download the program to the target board.

  4. Launch the debugger in your IDE to begin running the demo.

Note: Please insert the SDIO card into card slot(J47) after the debug console print “Please insert a card into board.”

Running the demo

When the demo runs successfully, the log would be seen on the terminal like:

SDIO freertos example.

Card inserted.

Card init finished, ready to access.

Read function CIS, in direct way

CIS read successfully

Read function CIS, in extended way, non-block mode, non-word aligned size

Read function CIS, in extended way, block mode, non-word aligned size

The read content is consistent.

Input 'q' to quit card access task.            
Input other char to access again