Writing an MQX driver for SN8000 module from Murata

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

cross mob
Anonymous
Not applicable

Hi all,

I'm trying to write an MQX driver for the SN8000 module from murata. This driver is in a very early stage, I'm using the SPI interface for communication between an K60FN1M0VL12 host and the SN8000 module. So far I can communicate with the module and I set up the parameters for the SPI interface (endianes an so on) an interrupts registers. But the WICED firmware gets to a point that I dont know what is doing, because the information provided by te BCM43362 datasheet is very poor. Is there another document that explains all the registers present in the BCM43362 chipset?

The code I don't know it's purpose is placed in the following file Wiced-SDK/WICED/WWD/internal/bus_protocols/SPI/wwd_bus_protocol.c inside the function wwd_bus_init. I'm using WICED 3.1.0. You can see the code next:

     /* Request ALP */

    VERIFY_RESULT( wwd_bus_write_register_value(BACKPLANE_FUNCTION, SDIO_CHIP_CLOCK_CSR, (uint8_t) 1,     SBSDIO_ALP_AVAIL_REQ ) );

    /* Wait until ALP is available */

    loop_count = 0;

    while ( ( ( result = wwd_read_register_value( BACKPLANE_FUNCTION, SDIO_CHIP_CLOCK_CSR, (uint8_t) 2, (uint8_t*) &data16 ) ) == WWD_SUCCESS ) &&

            ( ( data16 & SBSDIO_ALP_AVAIL ) == 0 ) &&

            ( loop_count < (uint32_t) ALP_AVAIL_TIMEOUT_MS ) )

    {

        host_rtos_delay_milliseconds( (uint32_t) 1 );

        loop_count++;

    }

    if ( loop_count >= (uint32_t) ALP_AVAIL_TIMEOUT_MS )

    {

        return WICED_TIMEOUT;

    }

    if ( result != WWD_SUCCESS )

    {

        return result;

    }

    /* Clear request for ALP */

    VERIFY_RESULT( wwd_bus_write_register_value(BACKPLANE_FUNCTION, SDIO_CHIP_CLOCK_CSR, (uint8_t) 1, (uint32_t) 0) );


The question is: What is ALP??

regards,

Oscar

0 Likes
1 Solution
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi Oscar,

ALP is the internal clock in BCM43362. After it is started the application waits for it to run.

In this case it is polled with 1mSec intervals for duration of 100 mSec (ALP_AVAIL_TIMEOUT_MS).

Please check your RTOS delay setup and verify the delay works as expected. For workaround you can increase the duration in ALP_AVAIL_TIMEOUT_MS to verify the clock starts es expected.

Seyhan

View solution in original post

0 Likes
2 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi Oscar,

ALP is the internal clock in BCM43362. After it is started the application waits for it to run.

In this case it is polled with 1mSec intervals for duration of 100 mSec (ALP_AVAIL_TIMEOUT_MS).

Please check your RTOS delay setup and verify the delay works as expected. For workaround you can increase the duration in ALP_AVAIL_TIMEOUT_MS to verify the clock starts es expected.

Seyhan

0 Likes
Anonymous
Not applicable

Hi seyhan,

Many thanks for the clarification.

Regards,

Oscar

0 Likes