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

nRF9160 DK UART Connection with External MCU

Hi, 

we have a nRF9160 DK where we have uploaded the AT_CLIENT example on. Have tested the board and it works fine, able to send AT Commands and join to the network etc...
Now we want to communicate with the nrf9160 modem through UART with an external MCU.

How can we connect the external MCU with the nrf9160 board through UART?

We have looked through the forum and the user manual but we were not successful with achieving our goal. We have also tried this example to establish serial communication with the nrf9160. 

The external MCU is a nrf52840. 

Would appreciate any help! 


Best Regards,
Hamza

  • Hi,

    We have looked through the forum and the user manual but we were not successful with achieving our goal.
    How can we connect the external MCU with the nrf9160 board through UART?

     What are you planning to send over the UART? Are you planning to send AT commands, and control the modem on the nRF9160 using the nR52840? I.e. use the nRF9160 as a Serial LTE modem? or are you planning something else?

    What nRF52840 board are you using ? Do you have a custom board with a nRF52840, a nRF52840-DK, or are you using the on-board nRF52840 on the nRF9160DK?

    Is your nRF52840 application based on nRF5 SDK or NCS(nRF Connect SDK)?

    What pins on the nRF9160DK did you use for the UART ? Can you describe how you connected the nRF52840 and nRF9160DK?

    BR,

    Sigurd

  • Hi, 

    Yes, we are planning to send AT commands over the UART from the external MCU (nRF52840 DK) to nRF9160 modem (nRF9160 DK). Yes to use the nRF9160 as a serial LTE modem. 

    For nRF52840 we are using nRF5280 DK and the application is based on the nRF5 SDK. 

    nRF9160 UART Pins
    
    RXD Pin 0.00
    TXD Pin 0.01 
    RTS Pin 0.14
    CTS Pin 0.15
    
    nRF52840 UART Pins 
    
    RX Pin P0.05
    TX Pin P0.08
    RTS Pin P0.13
    CTS Pin 0.14


    Connection between nRF52840 DK and nRF9160 DK: 
    RX to TXD 
    TX to RXD 
    RTS to CTS
    CTS to RTS

    Best regards,
    Hamza

  • Hi,

    Steps if you are using nRF9160 DKs that is older than v.0.15.0:

    The board-controller FW that is on the nRF52840 on the nRF9160DK, will route the nRF9160 pins P0.00, P0.01, P0.14, and P0.15 to the Segger/programmer chip's virtual com port, but you need to route these pins to the header. Take a look at Martin's post here on how to do that: https://devzone.nordicsemi.com/f/nordic-q-a/45476/connecting-uart1-to-a-periph-on-nrf9160-dk/178988#178988

    The post is a tiny bit outdated on the names, the the target board for the nRF52840 on the nRF9160DK is now called nrf9160dk_nrf52840, and the config you need to set to route the pins P0.00, P0.01, P0.14, and P0.15, to the header is called CONFIG_BOARD_NRF9160DK_UART1_ARDUINO

    In the post a pre-compiled board controller with this configuration is also found, named board_controller_uart1.hex , flash it to the nRF52840 on the nRF9160DK. (remember to set programming switch to nRF52 when you do this)

    --

    If you are using nRF9160 DK v0.15 then all GPIOs are now always connected to headers.

    If you are still having issues, then try to use some other pins on the nRF52840DK.

    Let me know how it goes.

    BR,

    Sigurd

  • Hi,

    Update: 

    We managed to make it work with Serial LTE Modem example. Following this guide and scroll down to connecting with an external MCU. The only issue this doesn't work is that the guide does not state how to get GPIO output level on nRF9160 side to 3V. @Heidi states on this forum discussion that the SW11 is to be set to 3V for to get the correct GPIO output level. So the solution is as follows: 

    on nRF52840 DK we flashed nrf52 client lte

    on nRF96160 DK we flashed serial_lte_modem 
    on nRF9160 DK set SW11 to 3V (!!!!)

    Connect UART pins according to connecting with an external mcu table in slm description

    If those steps are followed correctly, then nRF9160 UART is accessible and responsive to AT Commands.

    Hopefully this is helpful for everyone! 

    Regards,
    Hamza

  • Hi,

    Great!

    Hamza_HK said:
    The only issue this doesn't work is that the guide does not state how to get GPIO output level on nRF9160 side to 3V

     Thanks for the feedback. I agree that the guide should include this information. I will forward this improvement suggestion to the team.

Related