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

Peripheral UART example - Might I use UART_1 for send out data received via BLE?

Dear Support

Try to modify this use UART_1 for sending out data received via BLE, which is pin P0.14 on nrf52833dk_nrf52833, I modified Kconfig file under the boards folder

config BT_NUS_UART_DEV
default "UART_1"  
It compiles ok, discovered by my phone,  but when i send message form BLE side,  I cannot probe the data on TX line with logical Analyser, while I see it when use default UART_0 on pin P0.06. 
Anything else I need to do in order to let it work on UART_1? My target board use other pins for UART interface, and I understand any pin can be configured to be UART pins.
Thanks you for your attention.
Ping
Parents
  • Thanks for your help, Oivind

    I use VS Code and connect SDK v1.9.1. I added uart1.overlay file when build and use pins like below:

    &uart1 {
        status = "okay";
        tx-pin = < 11 >;
        rx-pin = < 14 >;
        label = "UART_1";
    };
    But after compile and flashed, message still caught at PC terminal(P0.06) instead of the P0.14 on P24 connector.
    I also tried to change the KConfig file, still not working.
    Must be something else missed?
    Ping
  • You could change the BT_NUS_UART_DEV in prj.conf, but doing it in the Kconfig file is also fine, and accomplishes the exact same thing.

    The overlay file needs to be named the same as the board you are using, in your case nrf52833dk_nrf52833, or else it will not be included in the build.

    Pin P0.11 will cause you problems, as it is used by the network core. Pin P0.14 is used by the qspi, so you might encounter some issues there too. If you disable i2c1 like I suggested, P1.02 and P1.03 are both available. Those can be used by setting the pins to 34 and 35 in the overlay. (32+2 and 32+3) Edit: Wrong advice for the board used.

    Also try building pristine after changes to the prj.conf, overlay or Kconfig file.

Reply
  • You could change the BT_NUS_UART_DEV in prj.conf, but doing it in the Kconfig file is also fine, and accomplishes the exact same thing.

    The overlay file needs to be named the same as the board you are using, in your case nrf52833dk_nrf52833, or else it will not be included in the build.

    Pin P0.11 will cause you problems, as it is used by the network core. Pin P0.14 is used by the qspi, so you might encounter some issues there too. If you disable i2c1 like I suggested, P1.02 and P1.03 are both available. Those can be used by setting the pins to 34 and 35 in the overlay. (32+2 and 32+3) Edit: Wrong advice for the board used.

    Also try building pristine after changes to the prj.conf, overlay or Kconfig file.

Children
No Data
Related