Hi All,
I have a doubt in implementation of zb_SystemReset function in ZASA application for eZ430-RF2480.
Please, suggest if I am missing anything and misunderstanding the code?
I seen CC2480 interface specification document, and there is no any SAPI AREQ request, with cmd0=0x46 and cmd1=0x09.
Please, find below the details.
==========================================================================
file : common/zaccel/sapi.c
void zb_SystemReset(void)
{
sapiReq(MT_SAPI_SYS_RESET, 0, NULL, 0);
}
which decodes a call to sapiReq as
sapiReq(0x09, 0, NULL, 0); //Refer to common/zaccel/cc2480.h #define MT_SAPI_SYS_RESET 0x09
Now if I decode this sapiReq() function it becomes as,(Refer to common/zaccel/sapi.c)
static void sapiReq(uint8 cmd, uint8 arg, uint8 *req, uint8 len)
{
uint8 *pBuf = zaccelMsgBuf;
*(pBuf+MT_RPC_POS_LEN) = 2 + 0;
*(pBuf+MT_RPC_POS_CMD0) = 6;
*(pBuf+MT_RPC_POS_CMD1) = 0x09;
*(pBuf+MT_RPC_POS_DAT0) = 0;
*(pBuf+MT_RPC_POS_DAT0+1) = 0;
if (cmd == MT_SAPI_SYS_RESET)
{
*(pBuf+MT_RPC_POS_CMD0) |= 0x40;
}
else
{
*(pBuf+MT_RPC_POS_CMD0) |= MT_RPC_CMD_SREQ;
}
zaccelRPC(pBuf);
}
So the final result is a call with Request "len=2, cmd0=0x46, cmd1=0x09, data[0]=0, data[1]=0"
============================================================================
Which I beleive is This command does not exist's anyway?? OR Am I missing any thing or any document?
Thanks for your help.
Thanks and Regards,
Shivdas Gujare