4.7.2.5 User Application Development
- Build Project, upon building project user action is required as mentioned 14.1 User Action.
definitions.h
in all the files where UART will be used to print debug information.Note:definitions.h
is not specific to just UART peripheral, instead it must be included in all application source files where peripheral functionality will be exercised.- Edit device unique ID
(
zigbeeAppDeviceSelect.h
).All the Zigbee devices/modules will hold their unique IEEE address purchased from IEEE. For the demo purpose, where UID is not present in internal NVM, the pre-compiled fixed UID to be used. Edit the CS_UID to user defined value and not matching with combined interface UID (default 0xbee) as below in
zigbeeAppDeviceSelect.h
. - Declare an integer and add the following
code to APP_Initialize() function:
uint32_t wbz451_silicon_revision = 0x00;
wbz451_silicon_revision = DSU_REGS->DSU_DID;
appSnprintf("\n\r[Device DID] 0x%x \n\r", (DSU_REGS->DSU_DID));
if(wbz451_silicon_revision & (1 << 29)) // A2 Silicon // if((wbz451_silicon_revision >> 28) == (0x02))
{
/* PPS Output Remapping */
PPS_REGS->PPS_RPB0G1R = 11U;
PPS_REGS->PPS_RPB3G4R = 12U;
PPS_REGS->PPS_RPB5G3R = 11U;
}
else if((wbz451_silicon_revision >> 28) == (0x00)) // A0 silicon
{
/* PPS Output Remapping */
PPS_REGS->PPS_RPB0G1R = 21U;
PPS_REGS->PPS_RPB3G4R = 21U;
PPS_REGS->PPS_RPB5G3R = 22U;
}
- Optional files:
app_button_handler.c
,app_button_handler.h
,rgb_led.c
, andrgb_led.h
are located in<Harmony Content Path>\wireless_apps_pic32cxbz2_wbz45\apps\zigbee\ext_light\firmware\src
folder. These files enable proper LED and button functionality. Users can add these files to their project or utilize them to create other functionalities. Without these files, the LED may not work as intended. Additional code can be added toapp_zigbee_handler.c
to utilize the rgb_led functions during Zigbee callbacks. Seeapp_zigbee_handler.c
in theext_light.X
project for examples.