3 Replies Latest reply on Oct 19, 2019 9:36 AM by MiDa_1966691

    How to initialize SDIO in CYW943907AEVAL1F

    chch_4469616

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

        • 1. Re: How to initialize SDIO in CYW943907AEVAL1F
          ZhengbaoZ_96

          hello:

           

              I found our AEVAL1F really leaves SDIO interface in the board,  but can't find a SDIO device memo.

          we have a wwd_SDIO.c  in  the platform\mcu\bcm4390x ,  I think you can have a print or call from host_platform_bus_init in your application.

          • 2. Re: How to initialize SDIO in CYW943907AEVAL1F
            chch_4469616

            I've browsed through this file, but I can't find a.h file that calls it

            For example, when I call the "host_platform_bus_init" function in "wwd_dio.C", I call the "host_platform_bus_init" function in another file with the same name

            • 3. Re: How to initialize SDIO in CYW943907AEVAL1F
              MiDa_1966691

              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.pdf.pdf

              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