Connect a Laptop with Windows to Peripheral UART example

Sure, my question is very stupid, but after one day I found nothing to explain the principle of the situation, I decided to ask.

I have a laptop with built-in Bluetooth 5.2 and Windows 11. It runs a terminal testing program.

I have nRF5340 DK with the example Peripheral UART installed (nRF Connect SDK1.8.0). The board works normally, I tested it with a phone with Android and nRF Connect for Mobile. Everything is working fine. The board is connected to a desktop computer on which a terminal program is running and connected to COM port ( not USB).

Windows (laptop), sees the board. After pressing adding device (on Win), the LED on the board (connected) lights up for 1 second, Windows thinks about 5 seconds, and says try again. I imagine that it will connect to the board, and a window will appear to install a serial port to which I can connect through the terminal program. No PIN display window appears. I tried to quickly press button 1, possibly to confirm, nothing. I can transmit data over the phone without the board being BONDED. Let me just say that I've been doing Nordic for 6 months, and I've learned some things. But here I can't even imagine what should happen. Google didn't help either. Does anything else need to be installed on the board?

In the final version, it should be a remote device to which with any laptop with Bluetooth 5.2, to be able to connect and through a terminal program to exchange data via serial port.

Parents
  • Hi

    Just to make sure, you're talking about USB connector J2 on the nRF5340 DK, correct? By default, the UART connections should go to the Interface MCU and then to the USB connector from P0.19-P0.22 for one UART,  and P0.10, P0.11, P1.00 and P1.01 for the other. Both of these should be routed to the interface MCU, but are also routed to pin headers that can be "activated" if required. See section 3.2 in the nRF5340 DK user guide for details. If you disagree, can you describe what pins you mean they're going to by default? If there are any mistakes here we of course want to correct it.

    Best regards,

    Simon

Reply
  • Hi

    Just to make sure, you're talking about USB connector J2 on the nRF5340 DK, correct? By default, the UART connections should go to the Interface MCU and then to the USB connector from P0.19-P0.22 for one UART,  and P0.10, P0.11, P1.00 and P1.01 for the other. Both of these should be routed to the interface MCU, but are also routed to pin headers that can be "activated" if required. See section 3.2 in the nRF5340 DK user guide for details. If you disagree, can you describe what pins you mean they're going to by default? If there are any mistakes here we of course want to correct it.

    Best regards,

    Simon

Children
  • So consistently:

    1. I'm not talking about USB at all, I'm not commenting on how the COM ports are presented and in what sequence, after passing through JLINK and being seen in Windows.

    2. An example would be for this: peripheral_uart

    3. In main.c -> uart_init() , row 238, uart = device_get_binding(CONFIG_BT_NUS_UART_DEV);

    CONFIG_BT_NUS_UART_DEV = uart0

    from Kconfig -> row 30, config BT_NUS_UART_DEV default "UART_0"

    That is, we should use uart0 purely hardware in the processor.

     

    In this file PCA10095_Schematic_And_PCB.pdf

    page 2, uart0 does not exist, the count starts from 1. We assume that we are looking for uart1 according to the scheme. This must be P1.00/P1.00 pins.

    In page 4, top left UART_1 and VCOM0 are connected to the same U25. This is the first port, according to the count, i.e. so far everything is fine.

     

    P1.00/P1.00 pins are on the P3 terminal.

    Here https://infocenter.nordicsemi.com/index.jsp?topic=%2Fstruct_nrf53%2Fstruct%2Fnrf5340.html

    nRF5340 DK Hardware -> Virtual COM ports

    nRF5340 UART_1  is the same  - P1.00/P1.00 pins. (uart0 missing) (OK)

    ****

    However, the data (from uart0 in software) go to P24: P0.20 / 0.22 (uart2). There I connected my logic analyzer to see them. There is nothing on the other pins.

    It is this way because in (board folder files) nrf5340_cpuapp_common.dts, rows 142-149, pins are set to 20/22.

     

    It is not clear where the other serial ports should go (must be set) if someone decides to use them. In any case, the signals through the board will pass through other chips, not as described in the wiring diagram.

Related