[SOLVED]RTK Exception 206 11 2


#1

When i run the Target Monitoring Tool i sometimes get RTK exceptions when i have an error in my software. However i cannot find any information on such exceptions. Why is it that Wavecom won’t supply an application note describing ALL RTK exceptions?? And no, contacting our distributor is not a solution as they take weeks to answer back on issues.

My problem is that i have some software that crashes the modem every two hours and the only clue i have to go by is an “RTK exception 206 11 2”. Normally when something goes wrong in the software while running it in RTE mode, the debugger halts on the faulty location, either in my software or in the assembly of wavecoms own functions. But with this crash, the modem just restarts and the debugger runs along like it never happened, of course it has lost the connection in reality. I suspect it to be a memory leak but cannot locate any in my code.


#2

Here’s a list of the only RTK Exceptions that i know the description of:

RTK Exception Code Description

[]155 The supplied address is out of the heap memory address range[/]
[]161, 166 The supplied buffer header or footer data is corrupted: a write overflow has occurred on this block[/]
[]159, 172 The heap memory release process has failed due to a global memory corruption in the heap area.[/]
[]182 Link Counter Null. Link counter is a reference counting value used while allocating the heap memory.[/]
[]190 Stack overflow: This error occurs, when the Open AT® application uses local variables which exceed the size of custom stack defined in the Open AT® application.[/]
[]142 This exception occurs when a particular task in the Wireless CPU sends a message to a wrong Mailbox number or if the Mailbox is not coherent.[/]
[]151 RTK out of memory: This indicates that some invalid memory related operations (like allocating a huge chunk of memory and not releasing the memory) are being done from inside the application.[/]


#3

I’ve now come closer to finding the source of the problem. It seems that it’s a bug in the Open AT software that creates the above mentioned RTK exception everytime it has received 80 SMS.

I tested this with the following code:

#include "adl_global.h"


/***************************************************************************/
/*  Mandatory variables                                                    */
/*-------------------------------------------------------------------------*/
/*  wm_apmCustomStackSize                                                  */
/*-------------------------------------------------------------------------*/
/***************************************************************************/
const u16 wm_apmCustomStackSize = 1024;


/***************************************************************************/
/*  Local variables                                                        */
/***************************************************************************/
s8 SMSHandle;
u32 sms_counter;

/***************************************************************************/
/*  Local functions                                                        */
/***************************************************************************/

bool SMSHandler(ascii *smsTel, ascii *smsTimeLength, ascii *smsText)
{
	sms_counter++;
	TRACE (( 1, "Modtaget SMS nr. %d", sms_counter));

	return false;
}

void SMSCtrlHandler(u8 Event, u16 Nb)
{

}


/***************************************************************************/
/*  Function   : adl_main                                                  */
/*-------------------------------------------------------------------------*/
/*  Object     : Customer application initialisation                       */
/*                                                                         */
/*-------------------------------------------------------------------------*/
/*  Variable Name     |IN |OUT|GLB|  Utilisation                           */
/*--------------------+---+---+---+----------------------------------------*/
/*  InitType          |   |   |   |  Application start mode reason         */
/*--------------------+---+---+---+----------------------------------------*/
/***************************************************************************/
void adl_main ( adl_InitType_e InitType )
{
	sms_counter = 0;

    TRACE (( 1, "Embedded Application : Main" ));
    
    // TO DO : Add your initialization code here
	SMSHandle = adl_smsSubscribe((adl_smsHdlr_f)SMSHandler, SMSCtrlHandler, ADL_SMS_MODE_TEXT);
}

The above code was executed on Open AT firmware 7.3 running on a Q2687h module. The problem is there both in RTE mode and Real mode. The application crashes with an RTk Exception “206 11 2” exactly when it receives SMS number 80 everytime.


#4

does it also crashes if you increase the StackSize?
eg.:

/***************************************************************************/
/*  Mandatory variables                                                    */
/*-------------------------------------------------------------------------*/
/*  wm_apmCustomStackSize                                                  */
/*-------------------------------------------------------------------------*/
/***************************************************************************/
const u16 wm_apmCustomStackSize = 3*1024;

#5

Yes.

Here’s some more info:

[]Resizing the stack does not remove the problem or alter it in any way[/]
[]It does not have anything todo with the SIM Card getting full of SMS[/]
[]The problem is there with a new modem running on default settings[/]
[]It does not matter if it runs in RTE mode or in Real mode[/]
[]I get no other exception but RTK Exception 206 11 2[/]


#6

It has been confirmed by Wavecom that this is indeed a bug in the 7.3 firmware. The bug is solved in FW 7.4.


#7

What, exactly, is the bug?

Good!


#8

If you send around 80 SMS from the modem, then OpenAT crashes with an RTK exception 206, which is described as an semaphore overflow problem in the ADL Users Guide.


#9

IS that 80 SMS ever?

Or 80 SMS since the last restart?

Or 80 SMS within some period of time?

Or what?


#10

80 SMS before a reset. If you start your OpenAT software and sends 80 SMS, then it crashes. If you only send 70 and then restarts the modem (at+cfun=1), then you can send 80 SMS again.

It does not appear to be time-related all-though i haven’t tried changing the sending interval to the extreme. I discovered the problem when i saw that the time before it crashed got shorter if i decreased the sending interval and longer if i increased it.