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.
Hi guys,
I added some codes to read ADC value to sensor and collector example. I succeeded reading and sending ADC value from the sensor to collector. However, the sensor reads and sends only one time and stays freezing.
I checked the code and found out that it was stuck at a function ApiMac_processIncoming(); in sensor.c file.
void ApiMac_processIncoming(void) { ICall_EntityID src; ICall_EntityID dest; macCbackEvent_t *pMsg; /* Wait for response message */ if(ICall_wait(ICALL_TIMEOUT_FOREVER) == ICALL_ERRNO_SUCCESS) { /* Retrieve the response message */ if(ICall_fetchMsg(&src, &dest, (void **)&pMsg) == ICALL_ERRNO_SUCCESS) { if(dest == ApiMac_appEntity) { if(src == macEntityID) { /* Process the message from the MAC stack */ processIncomingICallMsg(pMsg); } else if(pMacCallbacks->pUnprocessedCb) { /* Initiate the unprocessed message callback */ pMacCallbacks->pUnprocessedCb((uint16_t)src, 0, (void *)pMsg); } } if(pMsg != NULL) { ICall_freeMsg(pMsg); } } } }
After reading ADC value, the program is freezing at line if(ICall_wait(ICALL_TIMEOUT_FOREVER) == ICALL_ERRNO_SUCCESS)
I have tried many ways to fix but still no solution.
Any suggest?