Porting WICED : Problem after loading nvram image

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

WICED version : WICED-SDK-3.4.0-AWS

WiFi module : murata Type1DX (BCM4343W, SDIO interface)

I'm trying to port WICED framework onto a custom board.

Now WiFi firmware and nvram image seem downloaded successfully, but WICED doesn't work correctly yet.

I attached SDIO command log.

I noticed that getting MAC address and getting firmware version are not processed successfully.

I doubted around interrupt routing, but I couldn't solve it.

Can you point out the mistake?

0 Likes
10 Replies
Anonymous
Not applicable

Could you please enable wwd logging and share the wwd log?

The SDIO log is not clear and useful.

Also you can try to reduce the SDIO clock frequency.

What host MCU are you using?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Host MCU is Cortex-A9.

I know it is not supported MCU, but I think WICED will work if its BUS interface and interrupt handling are implemented properly.

Here are logs with WWD_LOGGING_UART_ENABLE in wwd_logging.h,

WPRINT_ENABLE_WWD_INFO,  WPRINT_ENABLE_WWD_DEBUG, and WPRINT_ENABLE_WWD_ERROR in wiced_defaults.h

2.08MHz < SDIO_CLK < 25MHz:

/* wwd_management_wifi_on Turn off SDPCM TX Glomming */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 15

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (43 bytes)

/* Turn APSTA on */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 10

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (38 bytes)

/* wwd_wifi_set_ampdu_parameters() */

/* Set AMPDU Block ACK window size */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 19

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (47 bytes)

/* Set number of MPDUs available for AMPDU */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 15

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (43 bytes)

/* Set size of advertised receive AMPDU */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 20

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (48 bytes)

/* Send set country command */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 20

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (48 bytes)

/* Set the event mask, indicating initially we do not want any asynchronous events */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 28

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (56 bytes)

Wcd:> IOCTL pkt 0x20111268: cmd 2, len 0

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (28 bytes)

Wcd:> IOCTL pkt 0x20111268: cmd 110, len 4

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (32 bytes)

/* Get wlan random to seed PRNG. Not all wlan firmware supports this feature.*/

Wcd:> IOCTL pkt 0x20111268: cmd 262, len 9

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (37 bytes)

WWD SDIO interface initialised

/* wwd_wifi_get_mac_address */

Wcd:> IOCTL pkt 0x20111268: cmd 262, len 20

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (48 bytes)

WLAN MAC Address : FC:DB:B3:9E:47:BE

/* wwd_wifi_get_wifi_version */

Wcd:> IOCTL pkt 0x20111268: cmd 262, len 204

Wcd:> Sending pkt 0x20111268

WLAN Firmware    :

Wcd:> IOCTL pkt 0x20111268: cmd 55, len 4

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (32 bytes)

Wcd:> IOCTL pkt 0x20111268: cmd 57, len 4

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (32 bytes)

Wcd:> IOCTL pkt 0x20111268: cmd 59, len 4

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Wcd:< Procd pkt 0x20113E68: IOCTL Response (32 bytes)

Waiting for scan results...

  # Type  BSSID             RSSI  Rate Chan  Security         SSID

----------------------------------------------------------------------------------------------

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 39

Wcd:> Sending pkt 0x20111268

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 106

Wcd:> Sending pkt 0x20111268

Waiting for scan results…

  # Type  BSSID             RSSI  Rate Chan  Security         SSID

----------------------------------------------------------------------------------------------

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 106

Waiting for scan results...

  # Type  BSSID             RSSI  Rate Chan  Security         SSID

----------------------------------------------------------------------------------------------

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 106

Waiting for scan results...

  # Type  BSSID             RSSI  Rate Chan  Security         SSID

----------------------------------------------------------------------------------------------

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 106

Waiting for scan results...

  # Type  BSSID             RSSI  Rate Chan  Security         SSID

----------------------------------------------------------------------------------------------

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 106

when SDIO_CLK is set to slower, IOCTRL error occured.

When SDIO_CLK=1.04MHz:

/* Set the event mask, indicating initially we do not want any asynchronous events */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 28

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Received a response for a different IOCTL - retry

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 28

Wcd:> IOCTL pkt 0x201118B0: cmd 263, len 28

Could not set Event mask

Error 2 while starting WICED!

When SDIO_CLK=520KHz :

/* Set AMPDU Block ACK window size */

Received a response for a different IOCTL - retry

Could not set AMPDU parameters

Error 2 while starting WICED!

When SDIO_CLK is slower than 260KHz:

/* wwd_management_wifi_on Turn off SDPCM TX Glomming */

Wcd:> IOCTL pkt 0x20111268: cmd 263, len 15

Wcd:> Sending pkt 0x20111268

Wcd:< Rcvd pkt 0x20113E68

Received a response for a different IOCTL - retry

Could not turn off TX glomming

Error 2 while starting WICED!

Anonymous
Not applicable

Are you using OOB?

Can you please attach your nvram?

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

> Are you using OOB?

Yes. Following are codes about OOB interrupt. I set a breakpoint at sdio_oob_irq_handler, and I found the debugger stopped there. I attached a log file (putty20160425173334.log).

platform_config.h:

    #define WICED_WIFI_OOB_IRQ_GPIO_PIN  ( 0 )

platform.c:

    const platform_gpio_t wifi_sdio_pins[] =

    {

    #ifndef WICED_DISABLE_MCU_POWERSAVE

        [WWD_PIN_SDIO_OOB_IRQ] = {MCU_GPIO11, 10},

    #endif

        [WWD_PIN_SDIO_CLK    ] = {MCU_GPIO4, 14},

        ....

wwd_SDIO.c:

    static void sdio_oob_irq_handler( void* arg )

    {

      UNUSED_PARAMETER(arg);

      platform_mcu_powersave_exit_notify( );

      wwd_thread_notify_irq( );

    }

  

    wwd_result_t host_enable_oob_interrupt( void )

    {

      platform_gpio_init( &wifi_sdio_pins[WWD_PIN_SDIO_OOB_IRQ], INPUT_HIGH_IMPEDANCE );

      platform_gpio_irq_enable( &wifi_sdio_pins[WWD_PIN_SDIO_OOB_IRQ], IRQ_TRIGGER_RISING_EDGE, sdio_oob_irq_handler, 0 );

      return WWD_SUCCESS;

    }

  

    uint8_t host_platform_get_oob_interrupt_pin( void )

    {

      return WICED_WIFI_OOB_IRQ_GPIO_PIN;

    }

> Can you please attach your nvram?

I attach this file too. Type1DX_Final_nvram.txt is a base, and wifi_nvram_image.h is a converted file.

thanks.

0 Likes
Anonymous
Not applicable

Is the MAC address - FC:DB:B3:9E:47:BE - correct?

What is programmed to OTP?

0 Likes
Anonymous
Not applicable

I confirmed to murata's sales.

The formar "FC:DB:B3" in MAC address is vendor ID, so the function wwd_wifi_get_mac_address() seems to work correctly.

0 Likes
Anonymous
Not applicable

Can you get SDK 3.6.2 from muRata internal and run this again

And use the console app

The new console app has a "wlog" command that will get the log of the WLAN device and let us know if the FW is stuck somewhere

0 Likes
Anonymous
Not applicable

Thank you, nsankar. I will try it.

Is SDK version 3.6.2 correct? not 3.5.2?

0 Likes
Anonymous
Not applicable

Yes - correct. 3.6.2 is a private SDK release for specific customers, and muRata has access for this

Anonymous
Not applicable

I faced an another problem.

BESL is needed to build test.console application, but I'm trying to port WICED onto Cortex A9 platform. Of course, prebuilt binaries for CM3,CM4,CR4 are not compatible with CA9.

Could please you help me about this?  Can I get a prebuilt BESL library for CA9, or source code of BESL?

0 Likes