Initialization and Configuration

It is recommended to reset WF200 before running the initialization phase described below. The initialization and configuration is managed by wf200_init. WF200 initialization phase is as follow:

1. BUS Configuration

The bus configuration is handled by ::wf200_init_bus. It has a specific implementation depending on the bus used.

SPI Bus

During the SPI initialization, the host follows the steps below:

SDIO Bus

During the SPI initialization, the host follows the steps below:

2. WF200 Initialization

The WF200 initialization is handled by wf200_init_chip. During this phase, the host interacts with WF200 registers described in WF200 registers.

3. Firmware Download

First of all, the WF200 clock is enabled in wf200_download_run_bootloader. An optional test to verify the SRAM access is performed.

The firmware download is handled by wf200_download_run_firmware. A firmware binary needs to be loaded to the chip at power-up. The binary is signed and encrypted. This binary file is stored in a c table in wfm_wf200_XX.h (XX depending on the keyset used by WF200). Below is a diagram listing the steps followed by wf200_download_run_firmware to load the firmware. After the host notifies the "OK_TO_JUMP" state, the WF200 will issue a startup indication when ready.

4. Startup Indication

If the initialization proccess has been successful up to now the host should receive the startup indication from WF200.

The start up indication is described in the HiStartupIndBody_t structure.

5. PDS Configuration

Once the startup indication received, the host can send to WF200 the PDS configuration (Platform Data Set). The PDS contains information regarding the WF200 environment. Below are some examples:

The PDS is sent using a dedicated function wf200_send_configuration. The PDS presents itself in the FMAC driver as several string tables found in wf200_pds.c. Those tables are the results of the compression of a more complete and lisible file. You can find more information on the PDS in a dedicated page Platform Data Set.