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

Enabling CONFIG_UART_0_NRF_UART in nrf connect

I want to use CONFIG_UART_0_NRF_UART instead of CONFIG_UART_0_NRF_UARTE. But I don't get any option for this because CONFIG_UART_0_NRF_UARTE is selected by default .

I want to have 

#
# Serial Drivers
#
CONFIG_UART_NRFX=y
CONFIG_UART_0_NRF_UART=y
# CONFIG_UART_0_INTERRUPT_DRIVEN is not set
CONFIG_UART_0_ASYNC=y
# CONFIG_UART_0_NRF_PARITY_BIT is not set
CONFIG_NRF_UART_PERIPHERAL=y

But always getting 

#
# Serial Drivers
#
CONFIG_UART_NRFX=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0_ENHANCED_POLL_OUT=y
# CONFIG_UART_0_INTERRUPT_DRIVEN is not set
CONFIG_UART_0_ASYNC=y
# CONFIG_UART_0_NRF_PARITY_BIT is not set
CONFIG_UART_0_NRF_TX_BUFFER_SIZE=32
# CONFIG_UART_0_NRF_HW_ASYNC is not set
# CONFIG_UART_0_NRF_ASYNC_LOW_POWER is not set
CONFIG_UART_ENHANCED_POLL_OUT=y
CONFIG_NRF_UARTE_PERIPHERAL=y

Also if I put the required configuration in the proj.config, cmake fails to compile the project.

This is what I can get.

  • Not sure why it worked for me earlier, but it seems like you need to edit the dts fie for that.

    in the file zephyr\drivers\serial\Kconfig.nrfx there seems to be a check before enabling the UART legacy module

    config UART_0_NRF_UART
    	def_bool $(dt_nodelabel_has_compat,uart0,$(DT_COMPAT_NORDIC_NRF_UART))
    	select NRF_UART_PERIPHERAL
    	help
    	  Enable nRF UART without EasyDMA on port 0.
    
    config UART_0_NRF_UARTE
    	def_bool $(dt_nodelabel_has_compat,uart0,$(DT_COMPAT_NORDIC_NRF_UARTE))
    	select NRF_UARTE_PERIPHERAL
    	help
    	  Enable nRF UART with EasyDMA on port 0.

    when I edit v1.8.0\zephyr\boards\arm\nrf52dk_nrf52832\nrf52dk_nrf52832.dts

    to remove compatibility  nrf-uarte and replace it wiath nrf-uart

    arduino_serial: &uart0 {
    	status = "okay";
    	compatible = "nordic,nrf-uart";
    	current-speed = <115200>;
    	tx-pin = <6>;
    	rx-pin = <8>;
    	rts-pin = <5>;
    	cts-pin = <7>;
    };

    Then the config in your project seems to look the way you want

    #
    # Serial Drivers
    #
    CONFIG_UART_NRFX=y
    CONFIG_UART_0_NRF_UART=y
    # CONFIG_UART_0_INTERRUPT_DRIVEN is not set
    # CONFIG_UART_0_NRF_PARITY_BIT is not set
    CONFIG_NRF_UART_PERIPHERAL=y
    # CONFIG_UART_ALTERA_JTAG is not set
    # CONFIG_UART_RTT is not set
    # CONFIG_UART_XLNX_UARTLITE is not set

Related