10 Replies Latest reply on Oct 21, 2019 2:22 AM by MuraliR_36

    How does CYW943907AEVAL1F use SDIO

    chch_4469616

      Now I have a problem, do not know how to call the SDIO API interface.

      What should I do if “platform“ is called and undefined

      Here is my file:

        • 1. Re: How does CYW943907AEVAL1F use SDIO
          MuraliR_36

          Hi

           

          Could you try including 'platform_sdio.h' in the list of header files and check?

          if this doesn't work, could you share your project, so that i could look into it and figure out whats wrong?

          • 2. Re: How does CYW943907AEVAL1F use SDIO
            chch_4469616

            I have added the "Platform_sdio.h" header file to the project and is ready to use, but failed to initialize the SDIO,I used "platform_sdio_host_init" to initialize SDIO, but returned "WICED_ERROR".

            • 3. Re: How does CYW943907AEVAL1F use SDIO
              MuraliR_36

              Could you share your project so that we could look into it and figure out whats wrong?

              • 4. Re: How does CYW943907AEVAL1F use SDIO
                chch_4469616

                This is my current code, still testing feasibility,I don't know what went wrong,Please help me modify it, thank you

                #include "wiced.h"

                #include "../../WICED/platform/MCU/BCM4390x/peripherals/platform_sdio.h"

                 

                 

                void sdio_client_check_isr(void*);

                uint32_t data[1024];

                unsigned int leng = 0;

                 

                 

                void application_start( )

                {

                    /* Initialise the WICED device */

                    wiced_init();

                 

                 

                    if(platform_sdio_host_init(sdio_client_check_isr) != WICED_SUCCESS)

                    {

                        WPRINT_APP_INFO( ("sdio init error\n") );

                    }else

                        WPRINT_APP_INFO( ("sdio init successful\n") );

                }

                 

                 

                 

                 

                /* Client Interrupt handler */

                void sdio_client_check_isr( void* user_data )

                {

                    UNUSED_PARAMETER( user_data );

                    platform_sdio_host_disable_interrupt();

                }

                • 5. Re: How does CYW943907AEVAL1F use SDIO
                  chch_4469616

                  This is my current code, still testing feasibility,I don't know what went wrong,Please help me modify it, thank you

                   

                   

                   

                  #include "wiced.h"

                   

                  #include "../../WICED/platform/MCU/BCM4390x/peripherals/platform_sdio.h"

                   

                   

                   

                   

                   

                  void sdio_client_check_isr(void*);

                   

                  uint32_t data[1024];

                   

                  unsigned int leng = 0;

                   

                   

                   

                   

                   

                  void application_start( )

                   

                  {

                   

                  /* Initialise the WICED device */

                   

                  wiced_init();

                   

                   

                   

                   

                   

                  if(platform_sdio_host_init(sdio_client_check_isr) != WICED_SUCCESS)

                   

                      {

                   

                  WPRINT_APP_INFO( ("sdio init error\n") );

                   

                  }else

                   

                  WPRINT_APP_INFO( ("sdio init successful\n") );

                   

                  }

                   

                   

                   

                   

                   

                   

                   

                   

                   

                  /* Client Interrupt handler */

                   

                  void sdio_client_check_isr( void* user_data )

                   

                  {

                   

                  UNUSED_PARAMETER( user_data );

                   

                  platform_sdio_host_disable_interrupt();

                   

                  }

                  • 6. Re: How does CYW943907AEVAL1F use SDIO
                    MuraliR_36

                    Hi

                     

                    In the platform 'platform_sdio.h' file 'platform_sdio_host_init' is written as

                    extern wiced_result_t platform_sdio_host_init( sdio_isr_callback_function_t client_check_isr_function );

                    Thus, the function is just declared and is not defined.

                    You have to define the function first in your application and then use it. I tried it out in your code and got the log 'sdio init successful'

                    1 of 1 people found this helpful
                    • 7. Re: How does CYW943907AEVAL1F use SDIO
                      chch_4469616

                      Can you show me your routine

                      • 8. Re: How does CYW943907AEVAL1F use SDIO
                        MuraliR_36

                        I added these lines to your code and i get "sdio init error" or "sdio init successful" based on the functionality of the code.

                         

                        wiced_result_t platform_sdio_host_init( sdio_isr_callback_function_t client_check_isr_function )

                        {

                            if (your condition for success)

                             {

                                 //your code

                                  return WICED_SUCCESS;

                             }

                            return WICED_ERROR;

                        }

                        1 of 1 people found this helpful
                        • 9. Re: How does CYW943907AEVAL1F use SDIO
                          chch_4469616

                          You don't understand what I mean. I want to know how you define 'extern wiced_result_t platform_sdio_host_init(sdio_isr_callback_function_t client_check_isr_function' in 'platform_sdidi_sdidi_function';"This function can return success, or can you give me a routine about using SDIO for this development board CYW954904AEVAL1F? I am in urgent need of using SDIO now, but it has been unable to initialize and use, I hope you can give me a routine to learn. Thanks

                          • 10. Re: How does CYW943907AEVAL1F use SDIO
                            MuraliR_36

                            Here's an example of how platform_sdio_host_init() is defined and is available at

                            /43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/platform_sdio_host.c

                             

                             

                            wiced_result_t platform_sdio_host_init( sdio_isr_callback_function_t client_check_isr_function )

                            {

                                glob_sd = sdioh_attach( NULL, client_check_isr_function, 0 );

                             

                             

                                if ( glob_sd == NULL )

                                {

                                    return WICED_ERROR;

                                }

                             

                             

                                return WICED_SUCCESS;

                            }

                             

                             

                            The definition of glob_sd is available at /43xxx_Wi-Fi/WICED/platform/MCU/BCM4390x/peripherals/sdio_host/bcmsdstd.c

                            1 of 1 people found this helpful