DUAL UART

Hi Nordic,

1. Dual Uart this code i used

2.Its working fine and am getting output also

3.But i have doute its printing from uart0 but i want from uart1

4.For that i tried in many ways to get output from uart1 like commentoff (uart_irq_callback_user_data_set(uart_dev0, serial_cb0, NULL); uart_irq_rx_enable(uart_dev0);) and tried its printing from uart0 and its printed

5. Again i tried to commentoff this one (uart_irq_callback_user_data_set(uart_dev1, serial_cb1, NULL);
uart_irq_rx_enable(uart_dev1);) and tried its printing from uart0 and its printed

6.But whenever i commentoff both above statements but also am getting output and  printed

7.am really struggling here please help me out if i go in wrong way

8.I need print statement from uart1 this is agenda for me

9. I am using bl653_dvk board and west command tool

Parents
  • Hi,

    I'm not sure if I understand what you want. Do you want the printk() statements in the code output on UART1?

    The code already works by outputting text on both UART0 and UART1. The strings input on UART0 will be output on UART1, and text input on UART1 will be output on UART0. If you want to output other data to UART1, you can use the function print_uart(uart_dev1, rx_buf1); as I have done in the code, to print the context of rx_buf1 on UART1.

    The printk statements in code depends on the devicetree configs in the project. 

    Best regards,
    Jørgen

Reply
  • Hi,

    I'm not sure if I understand what you want. Do you want the printk() statements in the code output on UART1?

    The code already works by outputting text on both UART0 and UART1. The strings input on UART0 will be output on UART1, and text input on UART1 will be output on UART0. If you want to output other data to UART1, you can use the function print_uart(uart_dev1, rx_buf1); as I have done in the code, to print the context of rx_buf1 on UART1.

    The printk statements in code depends on the devicetree configs in the project. 

    Best regards,
    Jørgen

Children
Related