Showing posts with label EmberZNet. Show all posts
Showing posts with label EmberZNet. Show all posts

Friday, August 5, 2022

How to create periodic timer event and use iADC for EFR32 series 2 to do battery voltage monitor in GSDK 4.x and EmberZnet 7.x

How to create periodic timer event and use iADC for EFR32 series 2 to do battery voltage monitor in GSDK 4.x and EmberZnet 7.x

1. Add the following code in app.c

#define _IADC_

#ifdef _IADC_
#include "em_device.h"
#include "em_chip.h"
#include "em_cmu.h"
#include "em_iadc.h"
#include "em_gpio.h"
#endif //#ifdef _IADC_

#ifdef _IADC_
#define CLK_SRC_ADC_FREQ          20000000 // CLK_SRC_ADC
#define CLK_ADC_FREQ              10000000 // CLK_ADC - 10MHz max in normal mode
/*
 * Specify the IADC input using the IADC_PosInput_t typedef.  This
 * must be paired with a corresponding macro definition that allocates
 * the corresponding ABUS to the IADC.  These are...
 *
 * GPIO->ABUSALLOC |= GPIO_ABUSALLOC_AEVEN0_ADC0
 * GPIO->ABUSALLOC |= GPIO_ABUSALLOC_AODD0_ADC0
 * GPIO->BBUSALLOC |= GPIO_BBUSALLOC_BEVEN0_ADC0
 * GPIO->BBUSALLOC |= GPIO_BBUSALLOC_BODD0_ADC0
 * GPIO->CDBUSALLOC |= GPIO_CDBUSALLOC_CDEVEN0_ADC0
 * GPIO->CDBUSALLOC |= GPIO_CDBUSALLOC_CDODD0_ADC0
 *
 * ...for port A, port B, and port C/D pins, even and odd, respectively.
 */
#define IADC_INPUT_0_PORT_PIN     iadcPosInputAvdd;
#define IADC_INPUT_1_PORT_PIN     iadcNegInputGnd;

#define IADC_INPUT_0_BUS          BBUSALLOC
#define IADC_INPUT_0_BUSALLOC     GPIO_BBUSALLOC_BEVEN0_ADC0
#define IADC_INPUT_1_BUS          BBUSALLOC
#define IADC_INPUT_1_BUSALLOC     GPIO_BBUSALLOC_BODD0_ADC0

/*******************************************************************************
 ***************************   GLOBAL VARIABLES   *******************************
 ******************************************************************************/

static volatile int32_t sample;
static volatile double singleResult; // Volts

static sl_sleeptimer_timer_handle_t bat_volt_read_periodic_timer;
static void bat_volt_read_periodic_timer_callback(sl_sleeptimer_timer_handle_t *handle, void *data)
{
  (void)handle;
  (void)data;
  // Start IADC conversion
  IADC_command(IADC0, iadcCmdStartSingle);

  // Wait for conversion to be complete
  while((IADC0->STATUS & (_IADC_STATUS_CONVERTING_MASK
              | _IADC_STATUS_SINGLEFIFODV_MASK)) != IADC_STATUS_SINGLEFIFODV); //while combined status bits 8 & 6 don't equal 1 and 0 respectively

  // Get ADC result
  sample = IADC_pullSingleFifoResult(IADC0).data;

  // Calculate input voltage:
  // For differential inputs, the resultant range is from -Vref to +Vref, i.e.,
  // for Vref = VBGR = 2.42V, and with analog gain = 0.5, 12 bits represents
  // 4.84V full scale IADC range.
  singleResult = (sample * 4.84) / 0xFFF;

}
/**************************************************************************//**
 * @brief  Initialize IADC function
 *****************************************************************************/
void initIADC (void)
{
  // Declare init structs
  IADC_Init_t init = IADC_INIT_DEFAULT;
  IADC_AllConfigs_t initAllConfigs = IADC_ALLCONFIGS_DEFAULT;
  IADC_InitSingle_t initSingle = IADC_INITSINGLE_DEFAULT;
  IADC_SingleInput_t initSingleInput = IADC_SINGLEINPUT_DEFAULT;

  // Enable IADC0 and GPIO clock branches

  /* Note: For EFR32xG21 radio devices, library function calls to
   * CMU_ClockEnable() have no effect as oscillators are automatically turned
   * on/off based on demand from the peripherals; CMU_ClockEnable() is a dummy
   * function for EFR32xG21 for library consistency/compatibility.
   */
  CMU_ClockEnable(cmuClock_IADC0, true);
  CMU_ClockEnable(cmuClock_GPIO, true);

  // Reset IADC to reset configuration in case it has been modified by
  // other code
  IADC_reset(IADC0);

  // Select clock for IADC
  CMU_ClockSelectSet(cmuClock_IADCCLK, cmuSelect_FSRCO);  // FSRCO - 20MHz

  // Modify init structs and initialize
  init.warmup = iadcWarmupKeepWarm;

  // Set the HFSCLK prescale value here
  init.srcClkPrescale = IADC_calcSrcClkPrescale(IADC0, CLK_SRC_ADC_FREQ, 0);

  // Configuration 0 is used by both scan and single conversions by default
  // Use internal bandgap (supply voltage in mV) as reference
  initAllConfigs.configs[0].reference = iadcCfgReferenceInt1V2;
  initAllConfigs.configs[0].vRef = 1210;
  initAllConfigs.configs[0].analogGain = iadcCfgAnalogGain1x;

  // Divides CLK_SRC_ADC to set the CLK_ADC frequency
  initAllConfigs.configs[0].adcClkPrescale = IADC_calcAdcClkPrescale(IADC0,
                                             CLK_ADC_FREQ,
                                             0,
                                             iadcCfgModeNormal,
                                             init.srcClkPrescale);

  // Assign pins to positive and negative inputs in differential mode
  initSingleInput.posInput   = IADC_INPUT_0_PORT_PIN;
  initSingleInput.negInput   = IADC_INPUT_1_PORT_PIN;

  // Initialize the IADC
  IADC_init(IADC0, &init, &initAllConfigs);

  // Initialize the Single conversion inputs
  IADC_initSingle(IADC0, &initSingle, &initSingleInput);

  // Allocate the analog bus for ADC0 inputs
  GPIO->IADC_INPUT_0_BUS |= IADC_INPUT_0_BUSALLOC;
  GPIO->IADC_INPUT_1_BUS |= IADC_INPUT_1_BUSALLOC;
}
#endif//#ifdef _IADC_

2. Add the following codes in emberAfMainInitCallback

#ifdef _IADC_
  initIADC();
  sl_sleeptimer_start_periodic_timer(&bat_volt_read_periodic_timer, 1000, bat_volt_read_periodic_timer_callback, NULL, 0, 0);
#endif //#ifdef _IADC_

3. Battery voltage input to AVDD would be read to singleResult in bat_volt_read_periodic_timer_callback every second.

Tuesday, July 26, 2022

How to build EmberZnet 7.1.0.0 Z3Gateway on Raspberry Pi.

 The following steps show you how to build EmberZnet 7.1.0.0 Z3Gateway on Raspberry Pi.

 

1. Install Simplicity Studio v5 and GSDK 4.1.0 on Ubuntu 20.04LTS. For example, GSDK 4.1.0 is installed at "~/SimplicityStudio/SDKs/gecko_sdk_2" in my test.

2. Start Simplicity Studio File->New->Silicon Labs Project Wizard... and set "Target Device" as "Linux 32 Bit" to click NEXT button.

 

3. Select "Zigbee - Host Gateway" and click NEXT button.

 

4. Make sure you set project location to under your GSDK 4.1.0 folder such as my example "/home/yk/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gateway" and select "Copy contents" to click FINISH button.


5. Download and setup 2022-04-04-raspios-bullseye-armhf-lite.img for your Raspberry Pi.

6. Use sftp to copy the whole "/home/yk/SimplicityStudio" folder contents to your Raspberry Pi home folder.

7. Change direct to "~/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gateway" on your Raspberry Pi and run "make -f Z3Gateway.Makefile" to build Z3Gateway

8. After build successfully, you will get Z3Gateway binary under "~/SimplicityStudio/SDKs/gecko_sdk_2/Z3Gatewaybuild/debug/". You can run Z3Gateway by "Z3Gateway -p /dev/ttyACM0" under this folder.



Friday, June 17, 2022

How to intercept ZDO leave request in EmberZnet.

The following steps show you how to intercept ZDO leave request in EmberZnet.

1. Enable Packet Handoff plugin.

2. Use emberAfIncomingPacketFilterCallback in project callbacks.

3. Add the following code to intercept ZDO leave request.

uint8_t* cmd;
EmberPacketAction emberAfIncomingPacketFilterCallback(EmberZigbeePacketType packetType, uint8_t* packetData, uint8_t* size_p, void* data)
{
  if(packetType == EMBER_ZIGBEE_PACKET_TYPE_ZDO){

      emberAfZdoPrintln("Receive EMBER_ZIGBEE_PACKET_TYPE_ZDO");
      emberAfZdoPrintBuffer(data,sizeof(data), true);
      cmd=(uint8_t*)data;
      if((cmd[2])==0x34 && (cmd[3])==0x00)
        emberAfZdoPrintln("-----------Receive ZDO Leave Request------------------------");
   }
  return EMBER_ACCEPT_PACKET;
}

Tuesday, May 31, 2022

How to use custom and increment token in Silicon Labs GSDK 4.x and EmberZnet 7.x

The following steps 2-4 show you how to use custom basic token and steps 5-7 show you how to use custom increment token in Silicon Labs GSDK 4.x and EmberZnet 7.x.

1. Turn on "Enable Custom Tokens" in Token Manager.


 

2.Add the following codes to sl_custom_token_header.h.

        #define NVM3KEY_BASICTOKEN1 (NVM3KEY_DOMAIN_USER | 0x4100)
        #define BASICTOKEN1_DEFAULT  0
        #ifdef DEFINETYPES
        typedef uint16_t tokTypeBasicToken1;
        #endif
        #ifdef DEFINETOKENS
        DEFINE_BASIC_TOKEN(BASICTOKEN1,
                                                  tokTypeBasicToken1,
                                                  BASICTOKEN1_DEFAULT)
        #endif

3. Implement counter incrementing and store to custom token TOKEN_BASICTOKEN1 when button is pressed in app.c. Add related code in sl_button_on_change.

void sl_button_on_change(const sl_button_t *handle)
{
  uint16_t cnt;
  if (sl_button_get_state(handle) == SL_SIMPLE_BUTTON_RELEASED) {
      sl_token_get_data(NVM3KEY_BASICTOKEN1, 0x7f, &cnt, sizeof(cnt));
      cnt++;
      sl_token_set_data(NVM3KEY_BASICTOKEN1, 0x7f, &cnt, sizeof(cnt));
  }
}

4. Build and download application into EFR32 to test counter read and set with increment in custom token.
 

5. Add the following codes to sl_custom_token_header.h.         

    #define NVM3KEY_COUNTERTOKEN1 (NVM3KEY_DOMAIN_USER | 0x4104)
    #define COUNTERTOKEN1_DEFAULT 0
    #ifdef DEFINETYPES
        typedef uint32_t tokTypeCounterToken1;
    #endif
    #ifdef DEFINETOKENS
        DEFINE_COUNTER_TOKEN(COUNTERTOKEN1,
                                                         tokTypeCounterToken1,
                                                         COUNTERTOKEN1_DEFAULT)
    #endif

6. Implement counter incrementing using increment token by adding related code in sl_button_on_change.

    void sl_button_on_change(const sl_button_t *handle)    
    {
      uint32_t buf;
      if (sl_button_get_state(handle) == SL_SIMPLE_BUTTON_RELEASED) {
          sl_token_get_data(NVM3KEY_COUNTERTOKEN1, 0x7f, &buf, sizeof(buf));
          sl_token_increment_counter(NVM3KEY_COUNTERTOKEN1);
          sl_token_get_data(NVM3KEY_COUNTERTOKEN1, 0x7f, &buf, sizeof(buf));
      }
    }
 7. Build and download application into EFR32 to test increment counter token when button is pressed

Wednesday, January 5, 2022

CLI command in EmberZnet to send IAS WD start warning command

 Using the following CLI command in EmberZnet to send IAS WD start warning command

//IAS WD Cluster: 0x0502
//ZCL header 01(Frame Control Byte) 0A (Transcation Seq no.) 00 (Command ID - Start Warning)
//ZCL Payload 10(0001(4 bits): Burglar mode 00(2 bits): Strobe/No 00(2 bits): Siren Level/low) FF00(Warning duration) 10(Strobe duty cycle) 00(Strobe level/low)
// Refer to section 8.4.2.3 in ZCL specification for details.

raw 0x502 {010A0010FF001000}

//0xB19D is short address of WD device and both 1 are source and destination endpoint.
send 0xB19D 1 1

Friday, October 15, 2021

How to use EmberZnet Cli command to send IAS WD command.

The following steps show you how to EmberZnet Cli command to send IAS WD command. 

1. Use any EFR32 to run SoC coordinator such as Z3Light example.

2. Use Cli "raw 0x502 {01000010000F0000}" to compose IAS WD command with raw data.

    Detail format of raw data in { } can be found in 2.4.1 General ZCL Frame Format of ZCL specification.

    01: Frame Control Field which can find details in section 2.4.1.1 of ZCL specification. 01 means "Command is specific or local to a cluster"

    00: Transaction sequence number

    00: Command identifier. Since we use "Command is specific or local to a cluster" in Frame Control Field. This command identifier should be matched to different cluster. In this case, it's IAS WD cluster (0x0502) Start warning (0x00) command which can be found in section 8.4.2.2 Commands Received of ZCL specification.

    10000F0000: Command Payload which is detailed in section 8.4.2.2.1.1 Payload Format of ZCL specification. 10 is Warning mode(Burglar)+Strobe(No)+Siren level(Low Level Sound). 000F is Warning Duration. 0000 is Strobe Duty Cycle and Strobe level.

3. Use Cli "send 0xD265 1 1" to send command to destination node with short address 0xD265 and endpoint 1.

4. You can verified the command is sent successfully on sniffer.



Tuesday, December 22, 2020

How to create a delay event in Simplicity Studio v5 and EmberZnet 6.9.0.0

You can use the following steps to create a delay event in Simplicity Studio v5 and EmberZnet 6.9.0.0 when press PB0 on BRD4001A to trigger a delay event.

1. New eventYKDelay as Command and eventYKDelayHandler as Callback in Event Configuration of Includes tab in isc file to generate related codes.

2. Add the following code in button-interface.c

EmberEventControl eventYKDelay;

void eventYKDelayHandler(void){
  emberEventControlSetInactive(eventYKDelay);
  emberSerialPrintfLine(APP_SERIAL, "2000ms delay event");
}

3. Add the the following line in emberAfPluginButtonInterfaceButton0PressedEventHandler to trigger eventYKDelayHandler after 2000 ms.

emberEventControlSetDelayMS(eventYKDelay, 2000);

4. Build and download code into EFR32 radio board.

5. Run the application and press PB0. You will see "2000ms delay event" printed on console 2 seconds later, which shows delay event works.




Monday, December 21, 2020

Create IAS CIE coordinator and IAS Zone Door Sensor using Silicon Labs EmberZnet

The following steps show you how to create IAS CIE coordinator and IAS Zone Door Sensor using Silicon Labs EmberZnet 6.9.0 

1. Create and run IAS CIE coordinator for BRD4180A.

    1.1 Using the following steps to create CIE project for BRD4180A.

    1.2 Select "HA IAS Control and Indication Equipment" as ZCL device type, "Coordinator or Router" as Zigbee Device type, and enable  IAS Zone Client/Network Creator related plugin.


 

    1.3 Generate code to build firmware and download firmware into BRD4180A.

    1.4 Launch console and use CLI command "plugin network-creator form 1 0x5678 13 13" to form centralized Zigbee 3.0 network.

    1.5 Use CLI command "plugin network-creator-security open-network" to allow IAS Zone device to join.


2. Create and run IAS Zone Door Sensor device for BRD4161A.

    2.1 Using the following steps to create IAS Zone project for BRD4161A.

    2.2 Select "HA IAS Zone" as ZCL device type, "Sleepy End Device" as Zigbee Device type, use 0x0015 as zone type, enable "Security Sensor Interface" and "Network Creator..." related plugin.

 

    2.3 Add the following pin defines in hal-config.h to simulate PB1 on BRD4001A as reed switch of door sensor.

            #define GPIO_SENSOR_PIN                       (7U)
            #define GPIO_SENSOR_PORT                      (gpioPortF)

    2.4  Generate code to build firmware and download firmware into BRD4161A.

    2.5 Launch console and use CLI command "plugin network-steering start 0" to join centralized Zigbee 3.0 network that is formed and opened in step 1.4 and 1.5.

 


    2.5 In sniffer log, you would see the following event that show you IAS Zone sensor works with CIE. Press PB1 on BRD4001A would send IAS Zone status change notification.


Wednesday, May 6, 2020

How Zigbee CIE and IAS device work.

The following steps show how Zigbee CIE and IAS device work:

1. ZC (act as CIE) enable permit join to allow IAS Zone device to join.

2. ZC does binding to IAS zone.

3. ZC sends a write attribute request to the joined IAS zone device to write the CIE IEEE Address attribute.

4. The joined IAS Zone device sends an IAS Zone Enrollment request to ZC (the CIE).

5. IAS zone device can send IAS Zone status report to ZC (the CIE) and ZC (the CIE) can receive IAS Zone report.

Wednesday, April 29, 2020

How to run node server with EmberZnet 6.7.3 Z3GatewayHost on Raspberry Pi.

Although Silicon Labs deprecates UG129: zigbee® Gateway Reference Design User's Guide, the following steps show you how to run node server with EmberZnet 6.7.3 Z3GatewayHost on Raspberry Pi.

1. Install the Raspbian Jessie Lite operating system on the SD card and start Raspberry Pi to ssh login.

2. Run the following command on console to install node server.

sudo chmod 666 /etc/apt/sources.list
sudo echo deb http://devtools.silabs.com/solutions/apt jessie main >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 90CE4F77
sudo apt-get update
sudo apt-get -y install silabs-zigbee-gateway
sudo apt-get -y install silabs-networking


3. Do "sudo reboot" to restart Raspberry Pi.

4. Login Raspberry Pi again and run "sudo service siliconlabsgateway stop" to stop siliconlabsgateway service.

5. Upload modified NCP.py and Z3GatewayHost to your Raspberry Pi root folder.

6.
  • Do "cd /opt/siliconlabs/zigbeegateway/tools/ncp-updater/" to switch to original NCP.py folder and make a copy of original NCP.py with "sudo mv ncp.py ncp-ori.py" if you want. 
  • Copy modified from Raspberry Pi root folder to /opt/siliconlabs/zigbeegateway/tools/ncp-updater/ using "sudo cp ~/ncp6.7.3.py ./ncp.py". 
  • Run "sudo chmod 777 ncp.py"
  • Run "sudo python ncp.py scan" and make sure you see the following response.



7.
  • Do "cd /opt/siliconlabs/zigbeegateway/bin" and run "sudo mv siliconlabsgateway siliconlabsgateway-ori" to make a copy of original siliconlabsgateway if you want. 
  • Copy Z3GatewayHost from Raspberry Pi root folder to /opt/siliconlabs/zigbeegateway/bin using "sudo cp ~/Z3GatewayHost ./siliconlabsgateway".
  • Run "sudo chmod 777 siliconlabsgateway" 
8. Run "sudo reboot" to restart Raspberry Pi and you can access to web service of Z3GatewayHost node server later.



9. If you want to build Z3GatewayHost by yourself, remember to enable all MQTT related and cJSON plugin to generate source codes.




Friday, February 14, 2020

Using EmberZnet DynamicMultiprotocolLightSoc example showing how to use custom token in EFR32 NVM3.

You can follow the steps to use custom token (using EFR32 NVM3) on EmberZnet DynamicMultiprotocolLightSoc example.

1. Create customer-token.h with the following defines and place it to project folder.

#define NVM3KEY_APP_VERSION_INFO  (NVM3KEY_DOMAIN_USER | 0x000A)
#if defined(DEFINETYPES)
typedef uint16_t tokenTypeAppVersionInfo;
#endif //DEFINETYPES
#ifdef DEFINETOKENS
DEFINE_BASIC_TOKEN(APP_VERSION_INFO,
                    tokenTypeAppVersionInfo,
                    0x0000)
#endif

2. Add customer-token.h to project include path and press "Generate" to generate codes.


3. You can use the following code to write and read the custom token.

    tokenTypeAppVersionInfo tokenVerInfo = 0x0101;
    halCommonSetToken(TOKEN_APP_VERSION_INFO, &tokenVerInfo);
    tokenTypeAppVersionInfo tokenVerInfoR;
    halCommonGetToken(&tokenVerInfoR, TOKEN_APP_VERSION_INFO);

Tuesday, April 2, 2019

How to build and run EmberZnet Z3Gateway on Raspberry Pi.

The following steps show you how to build and run EmberZnet 6.50.3 Z3Gateway on Raspberry Pi.

1. Install the Raspbian OS and Gateway Software according to section 2.3 in UG-129.

2. Set Up/Build the EMberZnet 6.50.3 Z3Gateway Application and MQTT Broker according to section 6.1.1 in UG-129.

3. Run "sudo service siliconlabsgateway stop" on Raspberry Pi console to stop siliconlabsgateway.

4. Rename built Z3GatewayHost (under sdks/gecko_sdk_suite/v2.2/app/builder/Z3GatewayHost/build/exe directory) to siliconlabsgateway and copy it to /opt/siliconlabs/zigbeegateway/bin to overwrite siliconlabsgateway under /opt/siliconlabs/zigbeegateway/bin

5. Copy the ncp.py to replace the original one under /opt/siliconlabs/zigbeegateway/tools/ncp-updater

6. Download NCP image (under C:\SiliconLabs\SimplicityStudio\v4\developer\sdks\gecko_sdk_suite\v2.5\protocol\zigbee\ncp-images\efr32mg12p432f1024gl125-brd4161a) to BRD4001+BRD4161A and connect it to Raspberry which will simulate ttyACM0 for Z3Gateway to communicate with.

7. Run "sudo service siliconlabsgateway start" on Raspberry Pi console to start siliconlabsgateway.

8. Open any browser and access to Raspberry Pi IP to test web UI of Z3Gateway


Thursday, December 13, 2018

How to use EmberZNet to do ZCL report

The following steps show you how to use EmberZNet to do ZCL report

Using ZCL_TEMP_MEASUREMENT_CLUSTER_ID to send temperature attribute report as example.

1. Prepare ZCL data buffer with emberAfFillCommandGlobalServerToClientReportAttributes. The buffer format is Attribute ID -> Data type -> Attribute data. For Attribute ID and Attribute data, it's low byte first.

uint8_t buff[5] = {0x00, 0x00, 0x29, 0x05, 0x06};  //Attribute ID (0x0000) -> Data type (0x29) -> Attribute data (0x0605). emberAfFillCommandGlobalServerToClientReportAttributes(ZCL_TEMP_MEASUREMENT_CLUSTER_ID, (uint8_t *) buff, 5);

2. Set source and destination endpoint with emberAfSetCommandEndpoints

emberAfSetCommandEndpoints(1, 1); //endpoint(uint8_t sourceEndpoint, uint8_t destinationEndpoint):

3. Call the following line to do unicast to coordinator

emberAfSendCommandUnicast(EMBER_OUTGOING_DIRECT, 0x0000);


Or call the following line to do unicast using binding address.

emberAfSendCommandUnicastToBindings();

Wednesday, January 31, 2018

How to create a periodic event and use LCD on BRD4001A Wireless Starter Kit Mainboards based on Silicon Labs Simplicity Studio 4/EmberZNet 6.1.0 Z3LightSoC example

The following steps show you how to create a periodic event and use LCD on BRD4001A Wireless Starter Kit Mainboards based on Silicon Labs Simplicity Studio 4/EmberZNet  6.1.0 Z3LightSoC example.

To enble LCD on BRD4001A Wireless Starter Kit Mainboards:

1.
 
    A. Open efr32mg1p232f256gm48.hwconf
    B. Select "DefaultMode Peripherals" tab
    C. Check "SPI Display"

2.

     A. Open Z3LightSoc.isc
     B. Go to "Plugin" tab
     C. Enable "Graphics Library"
     D. Generate code

To create a periodic event

1.
     A. Open Z3LightSoc.isc
     B. Go to "Includes" tab
     C. Press New button of "Custom Events"
     D. Naming your own periodic event to periodicEventControl/periodicEventFunction
     E. Generate Code

2. Open Z3LightSoc_callbacks.c and add the following codes:

     A. Add "#include "glib.h"", "EmberEventControl periodicEventControl;", and "extern GLIB_Context_t glibContext;"
     B. Add "GRAPHICS_Init();" in emberAfMainInitCallback() to initialize LCD graphics.
     C. Call "emberEventControlSetDelayMS(periodicEventControl, 1000);" in emberAfMainInitCallback() to initialize first call to periodicEventControl.
     D. Add the following periodicEventFunction to be called every seconds and redraw "EFR32 Hello App!" message from top to bottom on LCD.
            uint8_t y=5;
            void periodicEventFunction(void)
            {
              emberEventControlSetInactive(periodicEventControl);
              GLIB_clear(&glibContext);
              GLIB_drawString(&glibContext, "EFR32 Hello App!", 17, 5, y, 0);
              y+=5;
              if(y>120)
                y=5;
              DMD_updateDisplay();
              emberEventControlSetDelayMS(periodicEventControl, 1000);
            }

Build and download FW to EFR32 and you can see "EFR32 Hello App!" move from top to bottom of LCD on BRD4001A Wireless Starter Kit Mainboards.