nRF Connect SDK - LPUART not working nRF52840 and GSM

Hi,

I have been trying to interface GSM modem with nRF52840 using LPUART (nRF Connect SDK).  I have used below pins for connections:

nRF52840                -           GSM


P0.21 (TX)                -           RX

P0.22 (RX)                -           TX

P0.23 (REQ)              -           RTS

P0.24 (RDY)               -          CTS

I have tried lpuart sample code for AT command with async mode but the firmware crashes always. I didn't find any response from modem.

I also tried to revered REQ and RDY pins but got the same issue.

Can anyone help me to make it work ? Can you please verify the above connections ?

Thanks in advance.

 

  • Hi,

     

    Have you scoped the uart pins to see what happens on the bus?

    but the firmware crashes always

    Could you attach a fault log?

     

    Kind regards,

    Håkon

  • Hi @,

    Thanks for getting back to me.

    I do not have scope so I can not check the UART pins status.

    But yes I have checked loopback test in nRF52840-DK board by shorting TX-RX , REQ-RDY pins. It's working fine.

    But it doesn't work with GSM modem ! I don't know why !

    I am attaching logs here.

    Am I interfacing nRF52 and GSM correctly for LPUART ?

    Thanks again.
    Jitendra

    ASSERTION FAIL [err == 0] @ ../src/main.c:111<\r><\n>
    <9>Failed to initiate transmission<\r><\n>
    [00:00:01.266,357] <27>[1;31m<err> app: Tx aborted<27>[0m<\r><\n>
    [00:00:01.864,410] <27>[1;31m<err> os: r0/a1:  0x00000004  r1/a2:  0x0000006f  r2/a3:  0x00000001<27>[0m<\r><\n>
    [00:00:01.864,440] <27>[1;31m<err> os: r3/a4:  0x00000021 r12/ip:  0x00000000 r14/lr:  0x0000073f<27>[0m<\r><\n>
    [00:00:01.864,440] <27>[1;31m<err> os:  xpsr:  0x41000000<27>[0m<\r><\n>
    [00:00:01.864,471] <27>[1;31m<err> os: Faulting instruction address (r15/pc): 0x00011eb6<27>[0m<\r><\n>
    [00:00:01.864,471] <27>[1;31m<err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0<27>[0m<\r><\n>
    [00:00:01.864,501] <27>[1;31m<err> os: Current thread: 0x200004c8 (unknown)<27>[0m<\r><\n>
    [00:00:01.916,717] <27>[1;31m<err> fatal_error: Resetting system<27>[0m<\r>ÿ** Booting Zephyr OS build v2.7.0-ncs1  **<\r><\n>

  • Hi,

     

    jitendra_cf said:
    I do not have scope so I can not check the UART pins status.

    You should get a hold of a logic analyzer or oscilloscope when developing. It will save you time in the long-run.

    jitendra_cf said:
    I am attaching logs here.

    The log shows that the REQ/RDY lines are not set (from the external part) as the lpuart module expects.

    Could you try to use "normal" uart instead to see if it works then?

     

    Kind regards,

    Håkon

  • Hi,

    I have used normal UART and it's working fine but I would like to use LPUART.

    So I would like to confirm that is it feasible to use LPUART between nRF52840 and GSM modem using hardware flow control pins i.e. RTS, CTS, DTR, RI etc.

    Please help me.

    Thanks.

    Jitendra

  • Hi,

     

    You should scope your pins in both scenarios and see if they differ in behavior.

     

    Kind regards,

    Håkon

Related