How to initialize SDIO in CYW943907AEVAL1F

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
chch_4469616
Level 2
Level 2

I want to initialize the SDIO on the CYW943907AEVAL1F platform. What should I do,Thanks

0 Likes
1 Solution
MiDa_1966691
Level 4
Level 4
10 replies posted 10 sign-ins 5 solutions authored

Q)  How to initialize SDIO in CYW943907AEVAL1F

A) First look at the pin setup on the “CYW943907AEVAL1F Evaluation Kit”

Link to: CYW943907AEVAL1F Evaluation Kit User Guide

https://static6.arrow.com/aropdfconversion/3666c741a687e273d13bccf0e46f43144e93b68c/002-18703_00_v.p...

Reference: Section: 4.6 Micro SD Connector/Slot

The CY4343W uses a 4-bit SDIO version 2.0 interface

Table 4-5.

Micro SD Connector signals ( CYW943907AEVAL1F Evaluation Kit)

1 SDIO_DATA_0 DAT0

2 SDIO_DATA_1 DAT1

3 SDIO_DATA_2 DAT2

4 SDIO_DATA_3 CD/DAT3

5 SDIO_CMD CMD

6 SDIO_CLK CLK

7 PWM_0 DETECT

Make connection from your:  SDIO Module to the CYW943907AEVAL1F Evaluation Kit using Table 4-5

Code:

Add in your Plateform.c file  -- Configure SDIO pins -

Cut and Past below:

/* Wi-Fi SDIO bus pins. Used by WICED/platform/STM32F2xx/WWD/wwd_SDIO.c */

const platform_gpio_t wifi_sdio_pins[] =

{

[WWD_PIN_SDIO_OOB_IRQ] = { GPIOD, 12 },

[WWD_PIN_SDIO_CLK]     = { GPIOC, 12 },

[WWD_PIN_SDIO_CMD]     = { GPIOD,  2 },

[WWD_PIN_SDIO_D0]      = { GPIOC,  8 },

[WWD_PIN_SDIO_D1]      = { GPIOC,  9 },

[WWD_PIN_SDIO_D2]      = { GPIOC, 10 },

[WWD_PIN_SDIO_D3]      = { GPIOC, 11 },

};

Note:

Don't forget to add wwd_SDIO.c to your project.

Init Call:

Init - is called on line 120 - in wwd_SDIO.c

wwd_result_t host_platform_bus_init( void )

Debug:

debug prints:  SDIO communication failure

Example: in wwd_SDIO.c file

/* Check if there were any SDIO errors */

if ( ( SDIO->STA & ( SDIO_STA_DTIMEOUT | SDIO_STA_CTIMEOUT ) ) != 0 )

{

goto restart;

}

else if ( ( ( SDIO->STA & ( SDIO_STA_CCRCFAIL | SDIO_STA_DCRCFAIL | SDIO_STA_TXUNDERR | SDIO_STA_RXOVERR ) ) != 0 ) )

{

wiced_assert( "SDIO communication failure", 0 );

goto restart;

}

If you need additional debug:

Ref to section 4 

WICED Studio Wi-Fi/Combo Forums

  1. a. Debugging and testing the SDIO interface

-Mike

View solution in original post

3 Replies