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

uart0 TX RX pin

Hi,

I am working on nrf5340. I would like to change the TX and RX default pin of uart0 to <33> and <32>, I modified the file "nrf5340_cpuapp_common.dts" as below. 

The issue is that If the FW is without BLE, it works(e.g. load the zephyr/samples/hello_word),  if the FW with BLE, doesn't work, I can not see any message out from the UART.

If I  use <36> and <37> pins, it works with BLE.  What is the cause of this issue and How do I assign PIN 33 and PIN 32 to UART0?

  • Hi,

    I would recommend that you use other pins if that is possible.

    Pin 32 and 33 correspond to P1.00 and P1.01. These are used for the UART on the network core, and this can not be changed from the application folder.

    If you are certain that you modify these pins, you will have to modify two files in in the board files folder: zephyr/boards/arm/nrf5340dk_nrf5340/
    The first file is nrf5340_cpunet_reset.c.
    Here you need to modify the two lines marked in red below to use different pins. They are set as 0 and 1, and the port (marked in blue) is set to 1, this translates to P1.00 and P1.01.

    The second file is nrf5340dk_nrf5340_cpunet.dts.
    Here you need to modify the uart0 node to use the same pins you selected in nrf5340_cpunet_reset.c.

  • Hi Øivind,

    Thanks for your quick response.

    One more question. Is it possible to disable the UART on the network core, so that we can use these pins for other peripherals?

  • That should be possible, but you will have to also modify nrf5340_cpunet_reset.c. Commenting out this code may be enough:

    In addition to disabling the uart0 node on the network core.

Related