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

UART2 not working in http_application_update example

Hi,

I am using v0.4.0 ncs sdk.

I added following in the nrf9160_pca10090ns.overlay file

&uart2 
{ 
   status = "ok"; 
   current-speed = < 9600 >;
   tx-pin = < 16 >;
   rx-pin = < 17 >;
   rts-pin = < 18 >;
   cts-pin = < 19 >;
};

I added following in the prj.conf file 

# UART 2 
CONFIG_SERIAL=y
CONFIG_UART_NRFX=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_2_NRF_UARTE=y

I added following in the application 

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

But when i run the code i am getting hard fault error when "uart_irq_callback_set(uart2, UDi_Uart2RxInt);" 

function is called. 

***** Booting Zephyr OS 1.14.99 *****<CR><LF>
Exception occurred in Secure State<CR><LF>
***** HARD FAULT *****<CR><LF>
Fault escalation (see below)<CR><LF>
***** BUS FAULT *****<CR><LF>
Precise data bus error<CR><LF>
BFAR Address: 0x50008120<CR><LF>
***** Hardware exception *****<CR><LF>
Current thread ID = 0x20021788<CR><LF>
Faulting instruction address = 0x199ea<CR><LF>
Fatal fault in ISR! Spinning...<CR><LF>

Can you help me in resolving this error ?

Regards,

Smitesh Mali

Related