I want to send and receive data over UART from an external microcontroller, but without using the VCOM ports. The main goal is to send sensor data from an external microcontroller to the nRF9160 DK and then use the MQTT protocol to publish the data. In my project i can only connect the nRF9160 to a power supply with a flashed program, so it wont be connected to a computer.
So far, i have only managed to route the UART port to the Arduino I/O pins, but this is trough the VCOM port. I have tried the method described in the link https://devzone.nordicsemi.com/f/nordic-q-a/47076/nrf9160-cannot-enable-uarte2, but it dosent seem to work.
Is there a way of using UART without being connected to a VCOM port?
You need to configure the 52840 chip on the dev-kit. It is what controls where a bunch of the pins on the 9160 get routed to. That chip has a zephyr board defined for it already here: "zephyr/boards/arm/nrf52840_pca10090" so you'll need to build a project for that board and load it (be sure to set the programming switch on the devkit so it targets the 52840 and not the 9160).
You can look at board.c in that directory for the code that actually configures the IO, and Kconfig in that directory contains all the options and some description of what they do.
Hope that helps!
Alright i will try that, thank you for your help!
Your question from the post is really helpful and seems to be identical to my problem. Could you please share the code. I would really appreciate it.
Please check out this thread on how you can change the code on the board controller.
Thanks Martin, I really appreciate it.