This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with simpleCollector

Other Parts Discussed in Thread: CC2530

Hello:

I’m using simpleCollector and simpleSensor to implement my Zigbee network. My simpleSensor seems to work ok but my simpleCollector can only assume coordinator state if I use xHOLD_AUTO_START compile option.

Using HOLD_AUTO_START the device never assumes neither coordinator nor router role.

I’m using my own board and tried both with cc2530-2.5.0 and cc2530-2.5.1a ZStack versions.

What I have found is this: the software debug reaches the  

if ( keys & HAL_KEY_SW_1 )    {

      if ( myAppState == APP_INIT  )

statement inside simpleCollector.c and runs all  zb_ReadConfiguration, zb_WriteConfiguration and  zb_SystemReset() functions. In fact cc2530 reboots after a HAL_KEY_SW_1 key press. The problem is that it does not reboot as a Coordinator. What I have been able to determine so far is that

zb_WriteConfiguration(ZCD_NV_LOGICAL_TYPE, sizeof(uint8), &logicalType); -> return( osal_nv_write(configId, 0, len, pValue) ); -> return NV_ITEM_UNINIT;

And zb_WriteConfiguration( ZCD_NV_STARTUP_OPTION, sizeof(uint8), &startOptions );

Always return NV_ITEM_UNINIT meaning that both ZCD_NV_LOGICAL_TYPE and ZCD_NV_STARTUP_OPTION are not initialized.

My pre compiler options are

HOLD_AUTO_START

BUILD_ALL_DEVICES

REFLECTOR

NV_INIT

NV_RESTORE

ZTOOL_P1

MT_TASK

MT_SYS_FUNC

MT_DEBUG_FUNC

MT_SAPI_FUNC

xMT_SAPI_CB_FUNC

BLINK_LEDS

What Am I doing wrong? Also how may I use ZTool to initialize these items? More precisely I need to know which Id, offset pairs should I use to read these parameter values using SYS_OSAL_NV_READ and Id,Ofset,Len,Value using SYS_OSAL_NV_WRITE?

Tks for your time,

Pedro