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
  • 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

Reply
  • 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

Children
  • 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.

  • Hi, Oivind

    I see, and figured out the pin on our target board, it indeed uses P1.01 and P1.02 and they work as UART1, thank you for your help!

    Another quick question, according to code, when UART receives message, it should be relayed over BLE end, I wonder whether there is a way to see the message, I enabled notification on App side, bit don't see any thing coming, or am I wrong?

    Thank you!

    Ping  

  • On the phone, I normally use our nRF Toolbox app, and its UART applet. After connecting in the app, you can swipe right to bring up a log. It should display any messages received, and you can type messages to send to the board.

Related