Problem Using UART2 on nRF9151 DK

I used the "echo_bot sample and tried to alter it to use UART2 instead of UART0. Aftet changing the code and putting in the needed overlay, the main() program begins to run but never comes back from the call

    int ret = uart_irq_callback_user_data_set(uart_dev, serial_cb, NULL);
This is line 87 of the program I've attached.  uart_dev is configured to point to UART2 (line 24). After trying to execute the line above, the console output appear to stall and it doesn't look like the program execution progresses any further.  I used an nRF9151 DK for this.
Do you know what the issue is?  Have I configured UART2 correctly?
Thank you
Steven Gordecho_bot_uart2.zipon
Parents
  • Thanks for the comments.  I made a mistake on the overlay when I did the first zip.  I've attached a new zip with the (I believe) the proper overlay.echo_bot_uart2_v2.zip

    The program still has the same behavior and issue.  It seems to never come  back from the call

        int ret = uart_irq_callback_user_data_set(uart_devserial_cbNULL);
    on line 87.  The only thing that I've changed from the orig echo_bot is pointing 'uart_dev' to uart2 on line 24, and adding the overlay that enables uart2. Do you know what the issue might be?
    On the question of ns vs a secure build, I only done ns builds because my understanding was that it was a simpler build, but I admittedly dont know much about this.  At this point, security is not a concern, although it will be at some point.  Is there a preference (ns or secure) that's the "better" one?
    Thanks!
    Steven Gordon 
  • I took the echo_bot sample and changed the binding to uart2 and added the overlay (identical to your overlay) and it ran without an issue.  I am able to get the echo in a serial terminal.
    make sure you are building for the nrf9151dk/nrf9151/ns and the overlay is included in the build

Reply Children
Related