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
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
Hi,
You need to add an overlay file which enables and sets up uart1, and also disables i2c1. Here's an example, that you can modify for your desired pins:
&uart1 {
status = "okay";
tx-pin = < >;
rx-pin = < >;
label = "UART_1";
};
&i2c1 {
status = "disabled";
};
If it still does not work, please tell me the pins you are using and any other information that may be useful.
If you are using SES, remember to run Project->Run CMake after changes to Kconfig, prj.conf, and overlay files.
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:
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.
Good News, Oivind
It is working on pin 34 & 35 - P1.02 & P1.03.
Still have some questions please, how can I tell P0.11 and P0.14(33,34) are used by other resources? I cannot see the the pins in .dts file. Our target board use pin 33 and 34 as uart pin, don't use any other interfaces, will it work on target board?
You are a star!
Ping
Sorry, I got completely mixed up and thought you were using another board. Disregard what I said about the pins in my previous reply.
But in your last reply I see the issue. Pins set to 33 and 34 in the DTS correspond to pins P1.01 and P1.02. If a pin is 32 or higher, it is on port 1, if it is less than 32 it is on port 0. So 34 means P1.02.
Try using tx-pin = < 34 > and rx-pin = < 33 > in the DTS, and connect to pin P1.02 and P1.01.