This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Route UART2 to external headers (not VCOM2)

Hi there, 

We are running the Serial LTE Modem sample on the nrf9160 DK. We are currently communicating AT commands via the USB cable and VCOM2.

However we would like to route these uart lines to the external pins, so that we can communicate with it from a different CPU. Our understanding is that we need to program P1.12 on the nrf52 to "0"? Is this indeed the case? How does one go about doing this? A switch would be a lot easier...

What firmware is by default running on the nrf52, if any, so that we can edit the correct firmware and not overwrite anything incorrectly.

Also, how do we route the uart signals on the nrf5340 DK to the external pins?

Regards,

Frikkie

  • Hi Sigurd, 

    It does not matter which UART really. We just want to be able to program the nrf91_UARTX_CTRL pins in order to disconnect the UART from the interface MCU.

    These pins are connected to the nrf52 on the DK. 

    We are thus looking for a project containing the source code that is running by default on the nrf52, so that we can edit the states of these pins.

    (By the way the signals are alreaddy routed the the external pins which we can access, however while the signals are also connected to the interface MCU, we are getting a lot of noise on the pins. When disconnecting the interface MCU, the signals work fine, but we want to have the interface MCU on in order to debug)

  • Hi

    The devicetree has its own function to toggle this, see Board controller firmware.

    From this:

    "

    And if you want to, for example, disable routing for the VCOM2 pins, add the following:

    &vcom2_pins_routing {
            status = "disabled";
    };

    "

    The same would be for vcom0.

    When doing this, you would build for the nRF52840 on the 9160DK, as it is the one controlling the pins. (nrf9160dk_nrf52840)
    I suggest putting the code above into a file in your project named boards/nrf9160dk_nrf52840.overlay.

    Is this what you are looking for?

    Regards,
    Sigurd Hellesvik

  • Hi Sigurd,

    The devicetree has its own function to toggle this, see Board controller firmware.

    From the description of the board controller firmware, this does indeed seem to be what we are looking for. 

    I suggest putting the code above into a file in your project named boards/nrf9160dk_nrf52840.overlay.

    We do not have a project for the nrf52. That is exactly what we are trying to figure out, what project should be loaded onto the nrf52.

    Can it be any random project (e.g. blinky etc.) to which we can just add the .overlay file, or should it be an empty project? Or is there a "Board Controller Firmware" example project which we can just not find?

Related