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

Serial Port 2

Hi

Yes. I want to do something like Peripheral_uart example but  I want to connect my serial device sensor  to NRF5340-DK via gpio pins available.

Then I want to get the sensor serial data by serial port of NRF5340 and then send it via BLE to a demanding device. In Peripherial_uart example

the direction of data flow is in opposite . 

Parents Reply
  • Hi

    It was not wrong, the zephyr.dts file contains the compiled device tree, meaning that RX should be P0.16 and TX should be P0.14.
    See the Zephyr link overview on more information on the Zephyr build process.

    I am sorry, I was mistaken on the 0x16 and 0x14.

    In the "nrf52840dk_nrf52840.dts" file, the correct pins are listed

    Here pins are P0.06, P0.08, P0.05 and P0.09.

    In the nRF5340, the peripherals can be configured to use different pins. This is set from registers in the nRF5340. However, in NCS, you do not need to write to these registers manually. Instead, you configure the pins using ".dts" or ".overlay" files, and NCS automatically configures the nRF5340.

    This means you can change what pins you want to use for TX and RX if needed.

    Regards,
    Sigurd Hellesvik

Children
Related