Configuration of Parameters

The ZLLDemo reference application has been modified to suit the requirements of the ATSAMR21-LED-Driver board.

Changes with respect to MCU operating frequency, peripheral configuration, and usage are performed in the hardware abstraction layer(HAL).

Optionally, to further modify HAL, the required code can be edited. The HAL can be re-built from command-line based on the instructions available in BitCloud Quick Start Guide.

The HAL Configuration (\BitCloud\Components\HAL\Configuration) parameters relevant to the ATSAMR21-LED-Driver board are covered under build switch PLATFORM_SAMR21_LED_DRIVER.

SAMR21_LED_DRIVER_PWM_CONFIG defines the clock and timer configuration specific to the ATSAMR21-LED-Driver board and the value shall be set to True.

PWM shall be set to False as this is the default BitCloud timer configuration and is not used for this board.

The unique 64-bit MAC address for the ATSAMR21-LED-Driver board is copied from EDBG chip and stored in the auxillary page of the internal flash in SAMR21G18A. FLASH_AUX_PAGE_ACCESS shall be set to True to retain this implementation.

The Dimmable Light has several configuration parameters relevant to ZigBee functionalities such as joining a network, addressing, networking tables as well parameters relevant to board support. Such configurable parameters are available in the \Application\configuration.h file, as shown in Figure 2.

Parameters relevant to the ATSAMR21-LED-Driver board support are:

#define APP_ZLL_DEVICE_TYPE APP_DEVICE_TYPE_DIMMABLE_LIGHT - sets the ZLL Device type as Dimmable Light.

#define APP_SCAN_ON_STARTUP 0 - disables active scanning for ZigBee networks when the light is reset.

#define BSP_SUPPORT BOARD_SAMR21_LED_DRIVER - includes all board related implementation for the ATSAMR21-LED-Driver board.

#define APP_USE_PWM - shall not be defined as this is the default PWM implementation in BitCloud and shall not be used for this board.

Default values can be retained for the other parameters in this file.