Getting Started with the 88W8801 on i.MX RT

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Getting Started with the 88W8801 on i.MX RT

474 次查看
mjbcswitzerland
Specialist V

Hi All

I have just received an embedded artist EAR00386 board with NXP WiFi module 88W8801.
Embedded Artists has patched the SDK so that there is a demo showing it in operation on their i.MX RT 1062 board - this builds, loads and runs.

However I don't find any information about how it is operating - for example, the wifi module's data sheets only give details about the SDIO interface's electrical specification.

Looking how the code starts I see that it first downloads a binary file to the interface (about 256k in size) - wlan_fw_bin[] in sd8801_wlan.h, which is the one for this particular module.
Later I see that it can send commands, like

#define HostCmd_CMD_MAC_CONTROL 0x0028

 (defined in mlan_fw.h)

Are there any details about the operation of the FW loaded and its interface apart from the SDK code base itself?

Regards

Mark

0 项奖励
回复
6 回复数

43 次查看
mjbcswitzerland
Specialist V

Finally I am working intensively on this and may have some remarks.

I'll start with what looks like a strange initialisation in the reference project:

 

        /* 3.3V voltage should be supported as default */
        ocr |= SDMMC_MASK(kSD_OcrVdd29_30Flag) | SDMMC_MASK(kSD_OcrVdd32_33Flag) | SDMMC_MASK(kSD_OcrVdd33_34Flag);

 


This is in SDIO_ProbeBusVoltage() in fsl_sdio.c.

I don't expect it really affects anything whether this is performed or not but if the range 2.9V..3.4V is to be set correctly it looks like it should also have additional flags set:

kSD_OcrVdd30_31Flag

kSD_OcrVdd31_32Flag

 


Regards

Mark

 

0 项奖励
回复

41 次查看
mjbcswitzerland
Specialist V

The following routine (in fsl_sdmmc_host.h) doesn't operate correctly.

/*!
 * @brief Send initilization active 80 clocks to card.
 * @Param host host handler
 */
static inline void SDMMCHOST_SendCardActive(sdmmchost_t *host)
{
    (void)USDHC_SetCardActive(host->hostController.base, 100U);
}



It commands 80 clocks to be sent and works if stepped though with the debugger.
However the 100 passed is a loop counter which causes it to not wait until the sequence has completed as it times out much too quickly. There are, in real operation, only about 10 clocks sent.

/*!
 * brief Sends 80 clocks to the card to set it to the active state.
 *
 * This function must be called each time the card is inserted to ensure that the card can receive the command
 * correctly.
 *
 * param base USDHC peripheral base address.
 * param timeout Timeout to initialize card.
 * retval true Set card active successfully.
 * retval false Set card active failed.
 */
bool USDHC_SetCardActive(USDHC_Type *base, uint32_t timeout)
{
    base->SYS_CTRL |= USDHC_SYS_CTRL_INITA_MASK;
    /* Delay some time to wait card become active state. */
    while (IS_USDHC_FLAG_SET(base->SYS_CTRL, USDHC_SYS_CTRL_INITA_MASK))
    {
        if (0UL == timeout)
        {
            break;
        }
        timeout--;
    }

    return ((0UL == timeout) ? false : true);
}


Since the timeout value is dependent on the processor speed it may have been Ok on slower processors but for the i.MX RT the timeout value needs to be increased to about 2000 to be on the safe side.

Regards

Mark

0 项奖励
回复

37 次查看
mjbcswitzerland
Specialist V

I am working on the Embedded Artists board and the reference project "eaimxrt1062_wifi_cli" always sets the SDHC bus to 1V8 operation.

However when CMD5 requests the device's capabilities it states that it doesn't support 1V8 mode of operation and the code doesn't activate it with the CMD11.

Therefore we are confused as to whether we should be using 3V3 or 1V8 bus levels, noting however that the reference HW and FW always uses 1V8 levels and seems to operate reliably.

What does NXP recommend? 1V8 or 3V3 signal levels???

0 项奖励
回复

461 次查看
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

All the documentation regarding the wireless applications is available in your SDK bundle.
Please take a look to it in the following directory docs\wireless.

Regards,

Daniel.

0 项奖励
回复

441 次查看
mjbcswitzerland
Specialist V

Hello Daniel

Many thanks - the project import didn't add any wifi documents but I have found the folder in the SDK installation ZIP file.

However, apart from a high level guide to what the demonstrations do and an API document [WiFi driver reference manual] (which is generated by doxygen from the project code - and therefore doesn't add any more information than found in the code itself) I didn't find anything that describes how things actually work.

For example, the downloaded binary function is not mentioned anywhere (apart from the fact that it is loaded during the initialisation) and, using a reference command to set the MAC address the API describes the call as

mjbcswitzerland_0-1717726213759.png

whereas looking at the code involved gives further insight:

 

    (void)wlan_ops_sta_prepare_cmd((mlan_private *)mlan_adap->priv[0], HostCmd_CMD_802_11_MAC_ADDRESS, HostCmd_ACT_GEN_SET, 0, NULL, (uint8_t *)mac, cmd);

 


showing the use of a host command

#define HostCmd_CMD_802_11_MAC_ADDRESS 0x004D

to transfer it over the SDHC bus.

The details about this layer of interaction is what I am trying to locate (it must be defined by the downloaded binary, which must have been generated from its code, based on such a specification).

Regards

Mark


0 项奖励
回复

430 次查看
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

All the available documentation of the SDK can be found in the docs directory of you zip SDK bundle.

I'm afraid we don't have any guide or user manual that technically describes the process you mention.

In case you have a specific question regarding the firmware or download process, I can ask internally for help.

Regards,
Daniel. 

0 项奖励
回复