hello all,
nRF Connect SDK: 1.5.0
nRF Connect Toolchain: 1.5.0
Desktop OS: Windows 10
I'm currently using nrf9160dk to explore the GNSS features. I take a look at the sample example of gps and was able to read NMEA protocols out of the VCOM via micro USB port. The next step I want to do is to route the output of NMEA code to the external UART pins which are P0.28, P0.29 for TX/RX.
I also read the thread,
So I try to configure the
CONFIG_BOARD_PCA10090_UART0_ARDUINO=y
But I checked the dependency file in zephyr_config.c, it seems there is not such parameter anymore. I guess the name has been changed since the thread is 2-yr old. So what's the current parameter I should change?
in config.c file the params related to UART are
GEN_ABSOLUTE_SYM(CONFIG_UART_INTERRUPT_DRIVEN, 1); GEN_ABSOLUTE_SYM(CONFIG_HAS_HW_NRF_UARTE0, 1); GEN_ABSOLUTE_SYM(CONFIG_HAS_HW_NRF_UARTE1, 1); GEN_ABSOLUTE_SYM(CONFIG_HAS_HW_NRF_UARTE2, 1); GEN_ABSOLUTE_SYM(CONFIG_HAS_HW_NRF_UARTE3, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_CONSOLE_ON_DEV_NAME, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_CONSOLE, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_CONSOLE_INIT_PRIORITY, 60); GEN_ABSOLUTE_SYM(CONFIG_UART_NRFX, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_0_NRF_UARTE, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_0_ENHANCED_POLL_OUT, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_0_INTERRUPT_DRIVEN, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_0_NRF_TX_BUFFER_SIZE, 32); GEN_ABSOLUTE_SYM(CONFIG_UART_1_NRF_UARTE, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_1_INTERRUPT_DRIVEN, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_1_ENHANCED_POLL_OUT, 1); GEN_ABSOLUTE_SYM(CONFIG_UART_1_NRF_TX_BUFFER_SIZE, 32); GEN_ABSOLUTE_SYM(CONFIG_NRF_UARTE_PERIPHERAL, 1);
Another question I have is, to change the serial comm baudrate, what's the proper method to do that?
UPDATE on 2021/04/14:
It works for me now. After working with Matt (our local FAE), we found there is no such option to add following code to prj.conf file.
CONFIG_BOARD_PCA10090_UART0_ARDUINO=y or CONFIG_BOARD_NRF9160DK_UART0_ARDUINO=ywhich is mentioned in this thread (2 years ago):
The current option has been moved to device tree, so I added an overlay file to the zephyr sample project: hello_world and build it for nrf9160dk_nrf52840 board. It's a separate project for the nrf52840 chip on the nrf9160dk. here is a diagram from hardware user guide,
U7 is controlled by nRF52 chip and we only need the hardware setting from hello_world project. More specifically, from the hardware user manual,
we need to flip the 'nRF91_UART1_CTRL' pin which is controlled by nRF52 chip.
After figure that out, all you need is an overlay file in the hello_world project folder, name it 'nrf9160dk_nrf52840.overlay' and put the following code into it,
&vcom0_pins_routing { compatible = "nordic,nrf9160dk-optional-routing"; control-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; status = "okay"; };
I struggled with the syntax error at the beginning, I found the guideline is helpful,