This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to interface external MCU host viaUART interface with nrf9160, with only 3 pins from UART (RD,TX,GND)

We would like to use nRF9160 has MODEM only feature, such that MCU in our product can talk to nRF9160 via UART interface.

We have found an sample application [Serial LTE Modem] that comes with nRFConnect SDK , we would need to use this application with following constraint

We have UART TX , UART RX and GND ( 3 signals ) and do not have provision for CTS/RTS or any other additional GPIO for interface MODEM(nRF9160) and our UART I/O signal TTL level is 3.3V

Is this possible to accomplish the same with the sample application [Serial LTE Modem]. 

External Com port ( 115200 bps, 8N1) , 

Pin connection between nrf9160 and 3.3v ttl-uart-usb cable connected to pc

 1. ( P0.11(RX) to usb to TTL cable (TX))

2. (P0.10(TX) to usb to TTL cable (RX))

3. Common ground 

In serial lte modem app .proj file modified to enable  Uart2 based macros and disabled the UART 0 based macro.

Note: I/O switch is kept at 3.3v side

Still couldn't get response for AT commands.

Please let me know is there is a steps to configure UART 2 with no flow control and no additional gpio .

I am using segger embedded studio.

With Best Regards,

Ilanchezhian T

Parents
  • Thanks for the response. 

    1. I could see the different information ( mentioned in nRF9160 DK HW manual and application description in developer guide) regarding the UART2 pins of the nrF9160. Which one is correct I am really confused. 

    nrF9160 DK connection diagram

    Different infomation in DK user guide and developer guide regarding UART2 connection with nrF9160

    2.regarding the settings to be touched I have taken a screen shot, could you provide your feedback for the same. 

    Project setting and configuration details

    3. As I am new to embedded linux based development, I do not really understand how feature configuration and pin configuration works in the form of .dts, .dtsoverlay, menuconfig and prj.conf. Please let me know the proper steps to configure and use application processors UART2 of nRF9160 in 2 pin mode. My end objective is to interface my external MCU host via UART interface to communicate via UART I/F with nrF9160 modem via AT commands.

    Thanks 

    Ilanchezhian T

  • Hi Ilan,

    Have you made any modifications to SLM? Have you enabled any configs or implemented the changes related to disabling flow control?

    I am not seeing this when I am testing SLM myself. I tested without any breakpoints, and when I press the button, I can see 'Ready' appear in LTE Link Monitor:

    Would you be able to share your project files?

    Best regards,

    Håkon

  • Hi again,

    It looks like I have been able to reproduce this, and we might have a workaround.

    Ilanchezhian T said:
    BUT IF I REMOVE the breakpoints and do the same it is not working as expected , in fact nothing happens, what is that i am doing wrong. 

    Exactly what is not working? Is the board not waking up? Are you able to send more AT commands? If you are not able to send anything it could be that LTE Link Monitor is failing.

    I have been able to reproduce similar behavior where LTE Link Monitor stops working after the breakpoints are removed.

    Could you please try debugging the board without LTE Link Monitor and switch to a dedicated serial output terminal? Here are the settings that worked on my side. Please note that you might need to select a different COM-port on your side. I have flow control enabled as I am using SLM out of the box.

    Below shows the use of AT#XSLEEP=2 and wake up by button.

    Please let me know if this works on your side. Is this a satisfying workaround at this stage? The issue you reported is is possibly a corner case related to LTE Link Monitory. Hopefully, you should be able to used LTE Link Monitor going forward with your project.

  • Hi Helsing, 

    Thanks for your reply.

    Thanks for confirming that  for me LTE link monitor stopped sending anything after issuing sleep AT command and pressing the wake up button. 

    I am confused what is COM8 in your case , is it the one of the enumerated port of Jlink ?.

    If that is the case  in my case it is as COM45, 46, 47 , I tried  in all ports but it is not working , it is not able to read the Ready message which used to appear when the modem gets powered ON.

    But Anyway , If I am using it has the external host interface where instead of using the UART0 ,using UART2 I could able to successfully sleep using AT#XSLEEP=2 command and  wakeup using the port pin P0.31. This works with both Debug as well as run mode. 

    Right now our use case is to have MCU to have external uart communication, But you can still suggest if I do need to test. 

    With Regards

    Ilanchezhian T 

  • Hi Ilanchezhian 

    Håkon is currently out of office, and I will assist in the mean time. 

    Ilanchezhian T said:
    I am confused what is COM8 in your case , is it the one of the enumerated port of Jlink ?.

    This should be one of the three comports enumerated by the nRF9160DK, yes. I will confirm this when he is available. 

    Ilanchezhian T said:
    But Anyway , If I am using it has the external host interface where instead of using the UART0 ,using UART2 I could able to successfully sleep using AT#XSLEEP=2 command and  wakeup using the port pin P0.31. This works with both Debug as well as run mode. 

    If I understand you correctly you can not get it to work if you try to use UART0 with default settings, but it works if you use UART2 and route the pins from the nRF9160DK to the external uart-ttl-usb device?

    Or are you using your own custom hardware rather than the DK?

    COM45, 46, 47 in your case should be connected to the nRF9160 on the DK, and would not be connected to the nRF9160 on your own board. 

    Best regards
    Torbjørn

  • This ticket shall be closed, As I can  interface with external GPIO and able to wakeup  UART from sleep

Reply Children
No Data
Related