iMX serial driver and 3G/GPRS modem disconnecting

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX serial driver and 3G/GPRS modem disconnecting

1,126 Views
andrew_questps
Contributor III

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...

Labels (2)
0 Kudos
2 Replies

559 Views
jimmychan
NXP TechSupport
NXP TechSupport

Just a suggestion, please check the IOMUX setting is correct and the below Daisy Chain inputs setting

IOMUXC_UART4_IPP_UART_RTS_B_SELECT_INPUT

IOMUXC_UART4_IPP_UART_RXD_MUX_SELECT_INPUT


0 Kudos

558 Views
andrew_questps
Contributor III

I am setting up the port as follows:

DDKIomuxSetPinMux(DDK_IOMUX_PIN_KPP_COL0, DDK_IOMUX_PIN_MUXMODE_ALT1, DDK_IOMUX_PIN_SION_REGULAR);

DDKIomuxSetPinMux(DDK_IOMUX_PIN_KPP_COL1, DDK_IOMUX_PIN_MUXMODE_ALT1, DDK_IOMUX_PIN_SION_REGULAR);

DDKIomuxSetPinMux(DDK_IOMUX_PIN_KPP_COL2, DDK_IOMUX_PIN_MUXMODE_ALT1, DDK_IOMUX_PIN_SION_REGULAR);

DDKIomuxSetPinMux(DDK_IOMUX_PIN_KPP_COL3, DDK_IOMUX_PIN_MUXMODE_ALT1, DDK_IOMUX_PIN_SION_REGULAR);

DDKIomuxSelectInput(DDK_IOMUX_SELEIN_UART4_IPP_UART_RXD_MUX, 0x1);

DDKIomuxSelectInput(DDK_IOMUX_SELEIN_UART4_IPP_UART_RTS_B, 0x1);


From the reference manual it seems to be the correct values to enter.

0 Kudos