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

Using UART2 in Asset_Tracker example

I want to expand the Asset_Tracker example by adding the possibility to send data through UART2 to the controller and then to the nRF Cloud.

I am unable to find any document explaining what is necessary to do so that compilation then works.

I added 

CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_2_NRF_UARTE=y

to the prj.conf but when I add 

 struct device *uart2 = device_get_binding("UART_2");
 uart_irq_callback_set(uart2, uart_cb);

to my main loop the program crashes.

Is there a document stating what to include and where, with explanation of what is being done and why? 

Also interesting to know where to set the pins for the UART2: I would like to have TXD on P0.11, RXD on P0.12.

Parents Reply Children
No Data
Related