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

Thingy:91 nrf9160 to CDC UARTE0_NS comms setup

I've got a Thingy:91 plugged into my computer and can see its USB terminals (/dev/tty.usbmodem143101 and /dev/tty.usbmodem143104). I can also see the "ZEPHYR USB" volume and its contents. This indicates to me that the connectivity bridge running on the Thingy:91's nRF52840 is operational.

I'm attempting to write out to UARTE0_NS which has been configured as per the following Zephyr config:

&uart0 {
  compatible = "nordic,nrf-uarte";
  current-speed = <115200>;
  status = "okay";
  tx-pin = <18>;
  rx-pin = <19>;
  rts-pin = <20>;
  cts-pin = <21>;
};

I'm also flashing the SPM sample, which I *think* permits the use of UARTE0_NS.

My program loops on waiting for the transmission to end. Am I missing anything so far?

Thanks.

Parents Reply Children
  • Understood. I will try this out on the office mac and see if I can reproduce. In the meantime, could you see if you get different results when using the LTE Link Monitor app from nRF Connect for desktop?

    Best regards,
    Carl Richard

  • Hmm. I've downloaded the Thingy:91 firmware files again and cannot connect via the LTE Link Monitor app. I installed the client app on the device (serial_lte_modem_2021-03-04_8e8c6089.hex) and ensured that its modem software is up to date.

  • OK, some more info for you. If I completely erase the board and flash the zephyr/samples/basic/blinky_pwm to it, all is well i.e. the LEDs blink and I can connect to the USB serial port and see the PWM debug log messages i.e.

    [00:00:24.099,334] <dbg> pwm_nrfx.pwm_nrfx_pin_set: pin 31, pulse 500000, period 1000000, prescaler: 5.

    etc.

    This categorically proves that the 52840 is forwarding on the UART comms from the 9160. Here's the resultant build/zephyr.dts file for the UART0:

    uart0: uart@8000 {
      compatible = "nordic,nrf-uarte";
      reg = < 0x8000 0x1000 >;
      interrupts = < 0x8 0x1 >;
      status = "okay";
      label = "UART_0";
      current-speed = < 0x1c200 >;
      tx-pin = < 0x12 >;
      rx-pin = < 0x13 >;
      rts-pin = < 0x14 >;
      cts-pin = < 0x15 >;
    };

    There's nothing stated about parity... I assume that it is excluded.

    Any more pointers? Thanks.

  • Hi again, Christopher!

    I just tried with the same Serial LTE Modem image and it worked fine. When you say that you cannot connect via the LTE Link Monitor app, is it because you can't see the device or is there no data/messages being transmitted? 

    I also successfully connected to the Thingy using "screen" on the Mac. Did you connect to the correct tty.usbmodem device? The Thingy:91 exposes two virtual com ports and only one is for UART logging.

    Best regards,
    Carl Richard

Related