Try explicitly testing that the uart1_hdl variable is greater or equal to zero. Wavecom use negative handle values to indicate error conditions. Your code just checks that the value is not zero. I know that you have taken the example from the doco - but that doesn’t mean that it’s right
Try something like this:
uart1_hdl = adl_OpenDevice( DF_UART_CLID, &settings );
if ( uart1_hdl > 0 )
{
uart_if->write( uart1_hdl, "Tx some bytes",13 ); <---this line does not work
}
else
{
// UART2 opening failed
return;
}
Try explicitly testing that the uart1_hdl variable is greater than zero. Wavecom use negative handle values to indicate error conditions. Your code just checks that the value is not zero. I know that you have taken the example from the doco - but that doesn’t mean that the example is right
Try something like this:
uart1_hdl = adl_OpenDevice( DF_UART_CLID, &settings );
if ( uart1_hdl > 0 )
{
uart_if->write( uart1_hdl, "Tx some bytes",13 ); <---this line does not work
}
else
{
// UART1 opening failed
TRACE (( "UART1 Open Failed. handle returns %d", uart1_hdl ));
return;
}
The other thing to do is to check the value of InitType as provided by adl_Main() - this will crudely let you know if you get a reboot because of an exception or a watchdog timeout…