Name

Test Programs — Details

Test Programs

The BCM943364WCD1 platform HAL contains a test suitable for the bcm943364wcd1_evb platform, that allows various aspects of that board to be tested.

Manual Test

The manual test is only built by default when targetting a BCM9WCD9EVAL1 motherboard based BCM943364WCD1 module (e.g. the BCM943364WCD1_EVB development kit).

This program tests various aspects of the basic platform port. The basic test can be used to validate the LED and push-button GPIO operation. Depending on the eCos configuration further testing of the flash (detecting on-chip and motherboard SPI devices) and ADC device access is performed.

When flash support is configured the test will display the memory address ranges for the flash areas.

[Note]Note

Whereas the on-chip flash is directly addressable, the off-chip SPI flash is given a logical address for use through the flash API but it is not actually memory mapped.

When ADC support is configured the manual program tests the ADC driver for the STM32. The only device connected to the ADC on the board is the thermistor connected to ADC1 logical channel 3, named TH1 on the motherboard. In addition the test also report the values of the Temperature, Vrefint and Vbat inputs that are sourced on-chip.

Wi-Fi firmware

With a suitable eCos configuration the manual application can be used to initialise the off-chip SPI flash memory on the BCM9WCD9EVAL1 motherboard. The use of the off-chip flash will normally be required for this platform due to the limited on-chip flash space with which to hold both an application and the required radio firmware binary.

The following example uses the command-line ecosconfig tool, though, as always, the necessary configuration changes can be performed using the graphical configtool tool if desired. This configuration is just being used to build a DIRECT application containing a copy of the firmware binary, and to allow that image to be written to the off-chip flash memory. It is not envisaged that real-world applications for this platform will make use of the DIRECT mode due to the limited space remaining for applications.

Prior to creating the actual configuration some non-default options should be placed into a file suitable for importing. These are used to ensure the correct configuration for the firmware update build of the manual application. This example assumes the following has been placed into the file tmp.ecm.

cdl_option CYG_HAL_STARTUP { user_value ROM };
cdl_option CYGFUN_NET_WIFI_BROADCOM_WWD_RESOURCES_INDIRECT { user_value 0 };
cdl_option CYGHWR_HAL_CORTEXM_DIAGNOSTICS_INTERFACE { user_value "gdb_hwdebug_fileio" };

Once the configuration fragment file has been created then the application can be configured and built using the following command sequence:

$ ecosconfig new bcm943364wcd1_evb lwip_eth
$ ecosconfig add CYGPKG_IO CYGPKG_IO_FLASH CYGPKG_CRC
$ ecosconfig import tmp.ecm
$ ecosconfig resolve
$ ecosconfig tree
$ make
$ make tests

The resulting install/tests/hal/cortexm/stm32/bcm943364wcd1/current/tests/manual application will then validate, and update appropriately if required, the off-chip firmware image. The firmware binary image included in the application is as defined by the selected WWD SDK. A successful run of the application will be similar to:

INFO:<Manual Test>
FLASH: 0x08000000-0x0807ffff, 4 x 0x4000 blocks, 1 x 0x10000 blocks, 3 x 0x20000 blocks
FLASH: 0xc0000000-0xc00fffff, 16 x 0x10000 blocks
INFO:<WWD configuration PLATFORM "BCM943364WCD1_EVB" SDK "3.5.2">
INFO:<WWD firmware image required and platform is INDIRECT capable>
INFO:<DIRECT F/W CRC 4585C974 mismatch against INDIRECT F/W CRC 48D488E3>
... Unlocking from 0xc0000000-0xc007ffff: ........
... Erase from 0xc0000000-0xc007ffff: ........
PASS:<Erased INDIRECT area C0001000-C0080000>
... Program from 0x080070dc-0x0805e5b0 to 0xc0001000: ......
PASS:<Programmed INDIRECT area>
... Locking from 0xc0000000-0xc007ffff: ........
PASS:<Current F/W image written to INDIRECT area with CRC 4585C974>
[ … rest of output elided … ]

Re-running the application will report that the off-chip image matches:

INFO:<Manual Test>
FLASH: 0x08000000-0x0807ffff, 4 x 0x4000 blocks, 1 x 0x10000 blocks, 3 x 0x20000 blocks
FLASH: 0xc0000000-0xc00fffff, 16 x 0x10000 blocks
INFO:<WWD configuration PLATFORM "BCM943364WCD1_EVB" SDK "3.5.2">
INFO:<WWD firmware image required and platform is INDIRECT capable>
INFO:<DIRECT F/W CRC 4585C974 image already installed in INDIRECT area>
[ … rest of output elided … ]

Subsequently, normal WWD Wi-Fi applications will use the CYGFUN_NET_WIFI_BROADCOM_WWD_RESOURCES_INDIRECT enabled support to allow all of the on-chip memory for application use; with the code loading the firmware binary from the off-chip storage.