This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

HCI Controller Only Build DFU

Is there a process in place for updating a controller only build via the HCI? My current set up is a 9160 as the BLE Host, a 52820 as the BLE controller, MCUs are connected over UART, NCS v1.7.0, custom board. The 52820 has MCUBoot enabled, and I have demonstrated before that the 52820 is updatable over UART but this was when I had the 52820 application built with the entire BLE stack enabled. I wanted to split the BLE stack between the two MCUs due to RAM constraints on the 52820. So now, I'm trying to support updating the 52820 application if necessary; however, it's difficult to communicate over UART with application layer messages without messing with the HCI infrastructure which is built on UART. Would appreciate any feedback or direction

Parents
  • Hi

    This has been done for v1.4.0 in this unofficial fork of our github repo. Here the firmware on the 52840 will be updated in the following manner: cloud-->LTE-->nrf9160-->UART-->52840.

    In order to repurpose the UART instance from HCI UART to DFU UART all you need to do is to change the callback handler. Simply call the following functions:

    static struct device *uart_dev;
    static struct device *uart_dev2; 
    ..
    ..
    ..
    /*
        Setting initial callback handler
    */
    uart_dev = device_get_binding("UART_x");
    uart_irq_callback_set(uart_dev, uart_cb);
    uart_irq_rx_enable(uart_dev);
    ..
    ..
    ..
    /*
        Changing callback handler
    */
    //uart_irq_rx_disable(uart_dev); // I tested without callig this, and it still worked
    uart_dev2 = device_get_binding("UART_x");
    uart_irq_callback_set(uart_dev2, uart_cb2);
    uart_irq_rx_enable(uart_dev2);

    Does this help you do what you want?

    Regards,
    Sigurd Hellesvik

  • Exactly what I'm looking for, thanks Sigurd. I'll work on implementing it this morning and let you know if I encounter any problems

    Edit: Haven't gotten it to work completely quite yet, but your answer solved the problem that I was asking about so I'll mark this as resolved

Reply
  • Exactly what I'm looking for, thanks Sigurd. I'll work on implementing it this morning and let you know if I encounter any problems

    Edit: Haven't gotten it to work completely quite yet, but your answer solved the problem that I was asking about so I'll mark this as resolved

Children
No Data
Related