AnsweredAssumed Answered

iMX serial driver and 3G/GPRS modem disconnecting

Question asked by Andre Webster on Nov 20, 2012
Latest reply on Nov 28, 2012 by Andre Webster
Branched to a new discussion

Hi all,

I have been provided a 3G modem to use with our iMX25 board via UART4.

The interface to the modem was designed a while ago as just an extra serial port so I am missing the carrier detect line from the modem to the cpu (which is to fixed in a later revision). When I attempt a dial-up connection via the WinCE control panel everything goes correctly we are able to authenticate and connect and send data back and forth via 3G. If I don't send any data I am getting disconnected from the modem via EV_RLSD (Carrier line has dropped), which in my case is impossible as the line is not physically connected. I have searched the iMX code and found that I am being disconnected in the following function SL_ModemIntrHandler() where is calls:

EvaluateEventFlag(pHWHead->pMDDContext, EV_RLSD);


For context:

SL_ReadModemStatus(pHWHead); 
if (!((PSER_INFO)pContext)->cOpenCount) 
{ 
     // We want to indicate a cable event. 
     // .... 
} 
else
 { 
     EnterCriticalSection(&(pHWHead->RegCritSec)); 
     try { 
          if (pHWHead->sUSR1 & CSP_BITFVAL(UART_USR1_RTSS, UART_USR1_RTSS_SET)) 
          { 
               // If we are currently flowed via CTS or DSR, 
               // ......
           } 
          else 
           {            
    // --> Modem is being disconnected here! 
               DEBUGMSG(ZONE_FUNCTION, (TEXT("RS232 disconnect notification!!!\r\n"))); 
               EvaluateEventFlag(pHWHead->pMDDContext, EV_RLSD); 
          } 
     } 
}




What I don't really understand is what that line of code is testing for - how does RTS/CTS cause a RLSD (carrier detect change) event to be generated?!

In SL_ReadModemStatus the hardware has already determined that there hasn't been a change in carrier detect, so I am not sure why the software is checking the flow control lines rather than carrier itself.

I have looked at the source code for the iMX family in CE7 and the code is exactly the same as that used for CE6, and it lives in serialhw.c in platform\common\src\soc\COMMON_FSL_V3\SERIAL so I would presume that all (or at least most) the iMX processors in the family would be exercising the code above if a modem was attached.

Has anyone seen this issue before?

Regards,

Barak


 

Message was edited by: Andre Webster Code editing does not work on this site - when I am editing I have 25 lines of code, then press apply and there are only 5...

Outcomes