I am working on Sierra Wireless AirPrime SL6087 module and using firmware 7.46.0, OS-6.36.0. I have written an AT application, which creates 4 task,
GPRS Task (Priority - 4) – Creates Message Queue to Transfer data between GPRS_Task and other Tasks, It does the GPRS connection, opens one TCP-Client Socket to connect to Remote Sever, that remains open for entire session, it is used to receive data from Remote Server. It also, creates one more TCP-Client Socket [when the Uart_Task has data to be transferred to Sever] to transfer data to remote sever and when all data is transferred, this connection is closed. The Uart_Task, invokes the GPRS_Task using Message Queue, when it has Data to send. The GPRS_Task also creates a periodic timer of 1min, that checks the if any data received from Remote Sever for processing, and raises query for Signal Strength using ‘at+csq’.
Uart_Task (Priority - 3), Uart_task, opens the comm-port 2 in Data mode to communicate to external world, and when it has data from external world, sends a Message to GPRS_Task to send it to remote sever, otherwise, it is blocked on Semaphore and released only when Uart Receive Event handler has received data to Process. i also releases semaphore for SMS_Task, if data requires SMS to be send.
NMS_Task (Priority - 2): NMS_Task is blocked on Semaphore, which is released when the 2nd TCP-Client Socket is created by GPRS_TASK on Uart_Task request, and WIP_WRITE event is received by the socket handler. Once released, it reads the buffer address from FIFO, and sends the data to remote sever using wip_write, and request to GPRS_Task, to close the Channel using Message Queue. And, again get blocked on semaphore.
SMS_Task (Priority - 1): SMS_Task is blocked on semaphore, which released when Uart Task has data to be send as SMS, other wise it is blocked on semaphore.
The address of buffer, which holds the data received by Uart_task, is communicated between task using adl_queue (QUEUE_ORDER). Three FIFOs have been created. First, between Uart_Receive_Event_handler & and Uart_Task, to hold address of buffer received by Uart_Receive_Event_handler and to be processed by Uart_Task. Second, between Uart_Task and NMS_Task, to hold address of buffer holding processed data to be send to remote server. And third, between, SMS_Task and Uart_task, to hold address of buffer holding processed Data to be send as SMS.
The AT application works as expected, randomly but it is getting the system getting reset.
To check the cause of reset, I used adl_InitGetType, it returns ‘0’ .i.e. ‘ADL_INIT_POWER_ON’.
I also subscribed, to ‘adl_errSubscribe’ but the error handler is never getting invoked. I am not getting any reason behind the reset.
Is there any way to detect the memory corruption? And, if the reset is happening because of memory corruption, what will be the return value of ‘adl_InitGetType’?
What may be the other possible reason of reboot?
Thanks in advance.