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

Asynchronous Uart Connection between nRF9160 DK and nRF52840 DK (NCS v1.9.1)

Hello,
as stated in the Title im trying to establish UART Communication betwenn a nRF52840 DK and a nRF9160 DK.
I need to use the Asynchronous API otherwise there are no other restrictions.

Im trying to send 8 Bytes (0x11 ,0x22 ...) from one Kit to the other for Debugging Purposes.

When im sending and receiving on the same Kit (nRF52 -> nRF52) or (nRF91 -> nRF91) everything works and i can see
the tx and rx of the Bytes.

My Problem comes up when im sending Bytes from one DK to another DK. The Transimission nRF52 -> nRF91 works fine
but if i try nRF91 -> nRF52 the nRF52 Aborts the Receiving Process

-----------
NRF52 -> NRF91 (RTT LOG of NRF91)
00> Inhalt:
00> 0000000000000000

-->nRF52 starts Transmission

00> Current Uart Error 0
00> Uart Eventtype 2
00> Length 1
00> 11

00> Current Uart Error 0
00> Uart Eventtype 2
00> Length 4
00> 22334455

00> Current Uart Error 0
00> Uart Eventtype 2
00> Length 3
00> 667788

00> Inhalt:
00> 1122334455667788
-----------


-----------
nr91 -> 52 (RTT LOG of nRF52)
00> *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
00> Current Uart Error 0
00> Uart Eventtype 3

-->nRF91 starts Transmission

00> Current Uart Error 0
00> Uart Eventtype 6
00> (Renabled RX) //Forcefully tried to renable Rx but it does nothing

00> Current Uart Error 0
00> Uart Eventtype 3

00> Current Uart Error 0
00> Uart Eventtype 6
00> (Renabled RX)

00> Current Uart Error 0
00> Uart Eventtype 6

00> Current Uart Error 0
00> Uart Eventtype 6

00> Current Uart Error 0
00> Uart Eventtype 6

00> Current Uart Error 12
00> Uart Eventtype 4

00> Current Uart Error 0
00> Uart Eventtype 4

00> Current Uart Error 0
00> Uart Eventtype 5

00> Current Uart Error 0
00> Uart Eventtype 6

00> Current Uart Error 0
00> Uart Eventtype 3
-----------

Both DKs use the UART0 Instance and RTT

My Config File looks like this

CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y
CONFIG_USE_SEGGER_RTT=y

CONFIG_DK_LIBRARY=y

CONFIG_SERIAL=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_0_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC=y
CONFIG_UART_0_NRF_HW_ASYNC_TIMER=1

CONFIG_UART_1_ASYNC=y

My Code is zipped here

async_uart.zip
My guess is im missing a crucial Konfig Option or the Uart Instances are somehow configured wrong

Any possible Solutions or Ideas would be greatly appreceated

Parents
  • Hello again Nick,

    I have tested this a little bit myself now and here are my conclusions to get it to work:

    • You should connect a GND pin on the nRF9160 DK with a GND pin on the nRF52840 DK.
    • You must set the VDD voltage of the nRF9160 DK from 1.8V to 3V, using SW9, as described here.

    Now, the application that I have tested this with uses UART1 on each DK. I haven’t used UART0 because I prefer not to use RTT for logging purposes. Possibility, there might be some more issues that I haven’t covered yet, but I hope my findings will help you anyway.

    Regards,

    Markus

  • Hello Markus,
    The Solution worked.
    It also works with the UART0 Instance.

    Many thanks for your Help.

    Regards,

    Nick

Reply Children
No Data
Related