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

nRF91: issues in setting the call back using uart_callback_set()

Hi,

I am able to set up uart async receive, but when I try to set the call back using uart_callback_set() so that i can call the uart_tx() routine to push the data out, but soon i call the uart_callback_set() the app crashes and in serial log it doesn't give any traces to see what went wrong.

{
    uart_irq_callback_set(dev, uart0_fifo_callback);
    uart_callback_set(dev, uart0_callback, dev);
    LOG_ERR("uart_callback_set: %d", status);
}

uart_tx(dev, buf, len, 100);

#UART CONFIGURATION
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_ASYNC_API=y
CONFIG_UART_0_NRF_FLOW_CONTROL=y

regards

KK

Related