This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

can not printk hello world to uart0

refer to:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrf91_dk%2FUG%2Fnrf91_DK%2Fboard_controller.html
devzone.nordicsemi.com/.../problem-with-uart0-on-nrf9160dk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Hardware
SW10 turn to NRF52
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

create in
~/ncs/zephyr/samples/hello_world/nrf9160dk_nrf52840.overlay
&uart0 {
    compatible = "nordic,nrf-uarte";
    current-speed = <115200>;
    status = "okay";
    tx-pin = <5>;
    rx-pin = <3>;
    rts-pin = <0xffffffff>;
    cts-pin = <0xffffffff>;
};

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/ncs/zephyr/boards/arm/nrf9160dk_nrf52840/nrf9160dk_nrf52840_defconfig
#add
CONFIG_UART_INTERRUPT_DRIVEN=y

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SES  IDE
project Hello world
Board Name: nrf9160dk_nrf52840

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.config
#
# Serial Drivers
#
CONFIG_UART_NRFX=y
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0_ENHANCED_POLL_OUT=y
# CONFIG_UART_0_NRF_PARITY_BIT is not set
CONFIG_UART_0_NRF_TX_BUFFER_SIZE=32
CONFIG_NRF_UARTE_PERIPHERAL=y
# CONFIG_UART_ALTERA_JTAG is not set
# CONFIG_UART_XLNX_UARTLITE is not set

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
another rs232 usb
cat /dev/ttyUSB0

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

can not read any char from Uart0, how do i do?  need help

Related