52840 NCS UART DFU

Hi

 I am currently working with my project with 52840 and i am using sdk v3.0.1 & toolchain v3.0.0 to develope.

 I am learning how to use DFU over UART from the application in Devacademy l9/e2 , it works fine using the example , after that i try it on my own project but because my project use one uart only , so UART DFU and my APP use the same uart(UART0) , and i added two config

CONFIG_SHELL=y
CONFIG_MCUMGR_TRANSPORT_SHELL=y

also init uart0 in my application 

void uart0_init(void)
{
    uint32_t err =  device_is_ready( dev_uart0 );

    if( err != true )
    {
        printk("\nUART_init_err = %d\n", err);
    }
    uart_irq_callback_user_data_set(dev_uart0,uart0_irq_callback, NULL )
   
    uart_irq_rx_enable( dev_uart0 );
}
i use Auterm(v0.35a) to Get image , Auterm data keep running into my uart0_irq_callback , not into MCUMGR shell
is there any way to let my application uart and uart dfu use the same uart and the same time without deinit the uart ? Thanks!
Parents
  • Hello,

    While checking the shared prj.config, I see that you are enabling RTT instead of UART for logs and the console, which disables all console output and logging over UART. So even if DFU starts working, you won't see any feedback on the UART line (used by Auterm), as it's being sent to RTT instead. Only one backend should be active. If you're doing DFU over UART, then UART must be the active log backend. RTT should be disabled during DFU testing. Try using the configuration below:

    CONFIG_LOG_BACKEND_UART=y
    CONFIG_LOG_BACKEND_RTT=n
    CONFIG_UART_CONSOLE=y
    CONFIG_RTT_CONSOLE=n
    

    Kind Regards,

    Abhijith

  • Hi

        Still not working , actually i can see DFU feedback from jlink RTT viewer with my original prj.conf settings.

    The only difference between success and fail is whether UART0 irq callback was intiailized by 

    uart_irq_callback_user_data_set API in the beginning, Is there any way to disable my irq callback? i tried uart_irq_callback_user_data_set(dev_uart0, NULL, NULL) but its not working.

    Fail

    success

    Regards,

    Wu

Reply
  • Hi

        Still not working , actually i can see DFU feedback from jlink RTT viewer with my original prj.conf settings.

    The only difference between success and fail is whether UART0 irq callback was intiailized by 

    uart_irq_callback_user_data_set API in the beginning, Is there any way to disable my irq callback? i tried uart_irq_callback_user_data_set(dev_uart0, NULL, NULL) but its not working.

    Fail

    success

    Regards,

    Wu

Children
No Data
Related