cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WBA52 Zigbee_OnOff_Client_SED Hard fault for ZB_LOG_MASK_LEVEL_3 or higher

SToma
Associate III

Hello,

during testing Zigbee_OnOff_Client_SED example, hard fault in time of joining network happen, when logging with ZB_LOG_MASK_LEVEL_3 or higher is configured. With ZB_LOG_MASK_LEVEL_2 or lower example works fine.

Hard fault analyzer report PRECISERR with BFAR 0x280027. Origin seems to be in the ZbLogPrintf (see attached screenshot with stack). Because it's library, it's out of my range.

ABMDx3.png

Depth, lqi, pjoin values are reported weird. See next log.

Any suggestion, except keeping log mask level low?

Thanks, Slavomir Tomascik

 

 

ZIGBEE Application Init
StackLayers Init (startupMode = 3)
Adding endpoint 17 (0x11), profile = 0x0104, mem = 108
**********************************************************
Network config : CENTRALIZED END DEVICE
Application Flashed : Zigbee OnOff Client .
Channel used: 14.
Link Key: ZigBeeAlliance09
Link Key value: 5a 69 67 42 65 65 41 6c 6c 69 61 6e 63 65 30 39
Zigbee Extended Address : 0x000000000000000lX
Clusters allocated are:
OnOff Client on Endpoint 17.
**********************************************************
NLME-RESET.request (warmStart = 0)
wpan0: MLME-RESET.request (default_pib = 1)
Attempting network discovery (scans = 3, type = 1, duration = 4)
MLME-SCAN.request (wpan0): type=1, page=0, mask=0x07fff800, dur=4, mask 1 of 1
BEACON addr16=0x0000, epid=0x000000000000000lx, ch= 0, pan=0x25a792bd, depth=658378024, rssi=15, lqi=11184, cost=0, pjoin=-128
BEACON addr16=0x900b, epid=0x000000000000000lx, ch= 0, pan=0x2693fdca, depth=-1815324882, rssi=20, lqi=10358, cost=1, pjoin=-128
BEACON addr16=0x123b, epid=0x000000000000000lx, ch= 0, pan=0x2693fdca, depth=-1815324882, rssi=20, lqi=10358, cost=2, pjoin=-128
BEACON addr16=0xacdb, epid=0x000000000000000lx, ch= 0, pan=0xcd638576, depth=1579061235, rssi=25, lqi=37662, cost=1, pjoin=-128
MLME-SCAN.confirm (wpan0): type=1, status=0x00
MLME-SCAN.confirm (status = 0x00, unscanned = 0x00200000)
MLME-SCAN.request (wpan0): type=1, page=0, mask=0x07fff800, dur=4, mask 1 of 1
BEACON addr16=0x0000, epid=0x000000000000000lx, ch= 0, pan=0x25a792bd, depth=658378024, rssi=15, lqi=11184, cost=0, pjoin=-128
MLME-SCAN.confirm (wpan0): type=1, status=0x00
MLME-SCAN.confirm (status = 0x00, unscanned = 0x00000000)
MLME-SCAN.request (wpan0): type=1, page=0, mask=0x07fff800, dur=4, mask 1 of 1
BEACON addr16=0x0000, epid=0x000000000000000lx, ch= 0, pan=0x25a792bd, depth=658378024, rssi=15, lqi=11184, cost=0, pjoin=-128
BEACON addr16=0x7ab2, epid=0x000000000000000lx, ch= 0, pan=0x2693fdca, depth=-1815324882, rssi=20, lqi=10358, cost=2, pjoin=-128
BEACON addr16=0x123b, epid=0x000000000000000lx, ch= 0, pan=0x2693fdca, depth=-1815324882, rssi=20, lqi=10358, cost=2, pjoin=-128
BEACON addr16=0x900b, epid=0x000000000000000lx, ch= 0, pan=0x2693fdca, depth=-1815324882, rssi=20, lqi=10358, cost=1, pjoin=-128
MLME-SCAN.confirm (wpan0): type=1, status=0x00
MLME-SCAN.confirm (status = 0x00, unscanned = 0x00000000)
wpan0: MLME-RESET.request (default_pib = 1)
NLME-JOIN.request(associate)
Associating (src=0x000000000000000lx) to 0xff0080e1 (epid = 0x000000000000000lx, lqi = 324987390, ch = 0)
Association Confirm (status = 0x00)
Trust Center address not configured, saving: 0x000000000000000lx

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ouadi
ST Employee

Hello @SToma,

Thanks for your post.

Indeed, when the trace level of Zigbee stack is set to ZIGBEE_CONFIG_LOG_LEVEL_3 or higher, some data printed are of type uint64_t and are not supported by the compiler configured to use the Reduced C library by default, leading to a HardFault.

In order to use a high trace level, please change the default parameter of the project following this directory :

MCU Settings/ Runtime library -> Standard C instead of Reduced C

Best regards,

Ouadi

View solution in original post

2 REPLIES 2
Ouadi
ST Employee

Hello @SToma,

Thanks for your post.

Indeed, when the trace level of Zigbee stack is set to ZIGBEE_CONFIG_LOG_LEVEL_3 or higher, some data printed are of type uint64_t and are not supported by the compiler configured to use the Reduced C library by default, leading to a HardFault.

In order to use a high trace level, please change the default parameter of the project following this directory :

MCU Settings/ Runtime library -> Standard C instead of Reduced C

Best regards,

Ouadi

SToma
Associate III

Hi Ouadi,

thank you. Standard C library solve hard fault problem.

Rssi and lqi values are still off, but it's working.

BEACON addr16=0x0000, epid=0x273e0d2825a792bd, ch=15, pan=0x2bb0, depth= 0, rssi=-128, lqi=255, cost=1, pjoin=1
BEACON addr16=0x7ab2, epid=0x93cc572e2693fdca, ch=20, pan=0x2876, depth= 2, rssi=-128, lqi=255, cost=1, pjoin=0
BEACON addr16=0x900b, epid=0x93cc572e2693fdca, ch=20, pan=0x2876, depth= 1, rssi=-128, lqi=255, cost=1, pjoin=0

 

Thanks.

Regards, Slavomir