'AT Host' and 'Modem Shell' via P28, P29, 5V and GND

Hello all,

I am currently using the nRF9160 DK for cellular uplink to our server for an evaluation. From the nRF connect software I use the provided firmware 'AT Host' and 'Modem Shell'. Both work well, I can send/recv data and I am leaning towards the former.

However communication with the device only seems to work once the USB UART is connected and initialized, whereas I am looking at connecting to it from a simple MCU, so TX/RX pins. However there are some strange states that I can use to explain the issue, based on the following photo:

  • State 1 - USB in PC, P28, P29 in. LED1, LED2 solid. I don't receive any bytes on RX via P29 *until* I connect to the virtual serial (via cu) on USB, then bytes can be read on RX where I see some initialization messages on both serial connections. I am assuming firmware is waiting on out-of-band CTS/DTS serial flag from the USB/UART? Then I can read both from the P29 and USB UART. (I note that I can then only send to the device via the P28 pin, USB UART on the device no longer seems to recv bytes)
  • State 2 - USB in power plug, P28, P29 in. LED1 flashes rapidly. Nothing else, no bytes received.
  • State 3 - VCC, GND, P28, P29 in. LED1 flashes rapidly. Nothing else, no bytes received (assuming similar to State 2)
  • State 4 - VIN, GND, P28, P29. Nothing. Is VIN working? Is there a switch / solder joint needing bridging?

In short, how am I able to utilise it fully via just 5v, gnd, P29, P28?

Many thanks!

Karsten

Parents
  • MCU DISCONNECT (SW6) seems to be the answer

    This little switch that not only controls the power from VIN (which previously was indeed disabled to prevent over-power when USB is also plugged) but also seems to cause that blocking until a USB connection was established.

    Perhaps someone can confirm this as the right approach? I am also assuming that I will need to switch it back to be able to flash it again.

    Hopefully my fiddling hasn't damaged the board! ;)

Reply
  • MCU DISCONNECT (SW6) seems to be the answer

    This little switch that not only controls the power from VIN (which previously was indeed disabled to prevent over-power when USB is also plugged) but also seems to cause that blocking until a USB connection was established.

    Perhaps someone can confirm this as the right approach? I am also assuming that I will need to switch it back to be able to flash it again.

    Hopefully my fiddling hasn't damaged the board! ;)

Children
  • Hi,

    Yes it looks correct, SW6 (IFMCU DISCONNECT) is the right and intended solution for your use case.

    When SW6 is in the default (left) position, the nRF9160 UART is routed through the on-board interface MCU (which also provides the USB virtual COM port). In this mode, applications such as AT Host and Modem Shell effectively depend on the USB CDC interface being present, which is why UART activity on P28/P29 only starts once a USB serial connection is opened.

    By switching SW6 to right position, the interface MCU is physically disconnected as mentioned here. This allows the nRF9160 GPIOs to be used directly by external circuitry without interference or "blocking" from the USB-related logic. This is the intended configuration when using the nRF9160 as a standalone modem.

    You are correct that you will need to move SW6 back to the left position to flash the device via USB (Firmware development mode) and It is very unlikely you have damaged the board as DK should be able to support this mode of operation. Thanks.

    Best Regards,
    Syed Maysum

Related