UART 2 Problem ( i can't open the port !)

Hello ,

i tried to open uart 2 with the function adl_OpenDevice(DF_UART_CLID, &Settings); , but i have this errors :

Trace HWL 1 ARM Data Abort caught at 00056B50, Current Task 0x01 by CP15
Trace RTK 1 ================== RTK STATUS start ==================
Trace RTK 1 ================== RTK STATUS end ==================
Trace SYS 1 Unable to find the string of the remote trace in the file (ID = 5877)
Trace SYS 1 Unable to find the string of the remote trace in the file (ID = 5878)

there is someone can you help me please !

Thank you .

You didn’t say what device you are using - you are sure that it does have a UART2…?

Also, you need to enable UART2 with AT+WMFM before it can be used - although I don’t think failure to do that should cause an RTK exception?

Did you check the return value from adl_OpenDevice :question:

Where, exactly, does the exception occur?

Thank you for your answer ,

i use the qt2787 , i have tis error in the function adl_OpenDevice(DF_UART_CLID, &Settings);

I can not retrieve the Hadler of the prgramme because it stop when it comes to this function

i tried with at+wmfm=0,1,2 but i have the same error.

errors :
Trace HWL 1 ARM Data Abort caught at 00056B50, Current Task 0x01 by CP15
Trace RTK 1 ================== RTK STATUS start ==================
Trace RTK 1 ================== RTK STATUS end ==================
Trace SYS 1 Unable to find the string of the remote trace in the file (ID = 5877)
Trace SYS 1 Unable to find the string of the remote trace in the file (ID = 5878)

My programe :

#include “adl_global.h”
#include “wm_uart.h”

/**************************************************************************/
/
Local variables /
/
**************************************************************************/
static psGItfCont_t s_g_uart_itf;
static s32 s_g_uart_handle;

/***********************************************************************/
/
Mandatory variables /
/
-------------------------------------------------------------------------
/
/
wm_apmCustomStackSize /
/
-------------------------------------------------------------------------
/
/***************************************************************************/
// Verification de la version de l’api
#if OAT_API_VERSION >= 400
const unsigned short wm_apmCustomStackSize = 4096;
#else
unsigned long wm_apmCustomStack[1024];
const unsigned short wm_apmCustomStackSize = sizeof(wm_apmCustomStack);
#endif

/*******************************************************************/
/
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 )
{
TRACE (( 1, “Embedded Application : Main” ));
sUartSettings_t Settings;
sUartLc_t line_coding;
psGItfCont_t pCont = &s_g_uart_itf;

/* Line Coding */
line_coding.valid_fields = UART_LC_ALL;
line_coding.rate = (eUartRate_t)(UART_RATE_USER_DEF | 57600 );
line_coding.stop = UART_STOP_BIT_1;
line_coding.parity = UART_PARITY_NONE;
line_coding.data = UART_DATALENGTH_8;

/* Device */
Settings.identity = “UART2”;
Settings.event_handlers = NULL;
//Settings.interface = &pCont;
Settings.interface = &s_g_uart_itf;
Settings.role = UART_ROLE_NM;
Settings.line_coding = &line_coding;
Settings.capabilities=NULL;

s_g_uart_handle=adl_OpenDevice(DF_UART_CLID, &Settings);
TRACE(( 1, “s_g_uart_handle (%d)”, s_g_uart_handle));

}

Thank you !

hi ,
it work well when i program the target but not in mode debug !!! why?