How does CYW943907AEVAL1F use SDIO

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

cross mob
chch_4469616
Level 2
Level 2

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:

pastedImage_0.png

0 Likes
1 Solution

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

View solution in original post

10 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

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?

0 Likes

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

0 Likes

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

0 Likes

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

pastedImage_0.png

#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();

}

0 Likes

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();

}

0 Likes

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'

Can you show me your routine

0 Likes

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;

}

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

0 Likes

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