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

[nRF Connect SDK] Need UART implementation

Target nRF52832(nrf52dk_nrf52832)
SDK NCS v1.9.1
Base source: C:\Users\user\ncs\v1.9.1\nrf\samples\bluetooth\peripheral_hids_keyboard

I want to add UART implementation. I review those samples and porting, but uart is not working.

C:\Users\user\ncs\v1.9.1\nrf\samples\bluetooth\peripheral_uart
C:\Users\user\ncs\v1.9.1\nrf\samples\peripheral\lpuart

I need 921600 bps and HW flow control.


What option do I need?
Can you please provide any sample?

Parents
  • Hi,

    The nRF52832 only has one UART. By default this is used for printing to console in the Peripheral HIDS keyboard sample, so in order to use the UART for something else you must make sure to disable this. with CONFIG_UART_CONSOLE=n.

    Both enabling hardware flow control and setting baudrate can be done with devicetree, using the properties hw-flow-control and current-speed. This can be done by creating an overlay file, such as nrf52dk_nrf52832.overlay, and add the properties to uart0:

    &uart0 {
    	status = "okay";
    	current-speed = <921600>;
    	hw-flow-control;
    };

    Best regards,

    Marte

  • And I had to add "CONFIG_UART_ASYNC_API=y" to use async uart.

    It worked. Thank you!

Reply Children
No Data
Related