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

DFU Secure Bootloader and Custom Board application

Hi,

I'm working on the custom board using nrf52832 chip and have performed the secure bootloader using ble on the custom board.

I have made these changes so far on the secure bootloader example,

changed the NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN to 24 because my custom board is using different pin configuration then the development kit. 

I have performed dfu successfully and new application runs but the issue is that the UART is not responding in the new application after dfu update however everything works fine if burn application without a bootloader.

what I think of this issue is that maybe the secure bootloader is using for some other purpose that my custom board is using for serial. 

Should I need to remove the BSP support from the secure bootloader and then try? if yes please tell me how to do that.

Otherwise please suggest why the UART is not responding after secure bootloader dfu.

Thanks

Parents
  • Hi Muhammad, 
    Which pin did you use for UART ? Could be that it conflict with one of the LED pins used in the bootloader firmware ? How do you do DFU ? via UART or BLE ?

    Could you try to do DFU update our UART example just to see if it works ? It's easier to debug a simple application using UART.

    I assume you are talking about the NRF5 SDK bootloader, not the mesh bootloader ? 

  • I'm using the following pins,

    #define UART_TX_PIN 9
    #define UART_RX_PIN 8

    I'm using the secure bootloader via BLE and talking about the NRF5 SDK bootloader.

    I have done some debugging using a logic analyzer on the UART_TX_PIN and UART_RX_PIN and I found that there was no data coming or going through it. Also, the application works fine when I remove the bootloader and runs the only application. So, it seems that the bootloader is interrupting or changing the UART pins that I defined. I'm confused at this moment.

    Thanks

  • Please try to debug the application, and see if there is any error. Make sure you have configured the UART pins and the peripheral properly. 

  • But why the UART works fine when we burn only the application to the nrf?

    Also, I have debugged the application after adding bootloader, it seems that the UART does not respond when we push some data to it.  

    it seems that the UART initializes but the responses I get are 

    00> app_uart_put Response: NRF_SUCCESS
    00> app_uart_put Error code : 0

    in the UART event handler, I get the event APP_UART_TX_EMPTY.

    But there is no error event in the event handler and nothing response from the UART.

    In the event handler, the event APP_UART_DATA is not happening, it seems UART is not responding

    I have debugged the UART again using the Logic Analyser, it shows that when I try to push some data to UART it does not show on the logic analyzer and similar in case of receiving.

    But when I run the same application without bootloader it shows data communication through the logic analyzer.

    I'm a bit confused about tracking the main issue. My finding says maybe there is something on a bootloader that is affecting the UART in the new application, please guide me on this what could be the possible issue with the bootloader + application combined with the UART?

    Thanks

  • The issue if I can think of is that UART has been initialized in the bootloader but not re-initialized properly in the application. Make sure the pins are not configured to something else in the bootloader. I assume you don't enable UART logging in the bootloader ? 
    Please try testing with the stock bootloader and the stock ble_app_uart example

Reply Children
No Data
Related