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

Device not connecting in boot loader mode

Hello ,

I am using nRF52832 controller in peripheral role. I have integrated Secure boot loader code. I am facing issue of mobile device is not getting connected to the DFU service in boot-loader.

When device is in Application  it is connected and operation is fine,but after entering DFU by triggering command from DFU service to enter boot-loader mobile does not get connected but device remains in boot-loader mode. SDK used is 15.2.0 . Secure bootloader example code from DFU section is used.

I am using Custom board with ready module integrated  of nrf52832 from RAYTAC (MDBT42Q-512KV2). Board has Power supply regulator on board. Input supply voltage 10 v to 30 v with 500 mA current rating. When i use supply input of 5 volt it works perfectly. But for 12 volts it gives me above error behavior. This issue is been faced after flashing secure boot-loader code. Without boot-loader code simple application works totally fine.

Thanks in advance.

Parents
  • Hello,

    When device is in Application  it is connected and operation is fine,but after entering DFU by triggering command from DFU service to enter boot-loader mobile does not get connected but device remains in boot-loader mode. SDK used is 15.2.0 . Secure bootloader example code from DFU section is used.

     What does that mean? How do you know it is "stuck in bootloader mode" if you are not able to connect? Can you see the advertisements from the bootloader?

     

    When i use supply input of 5 volt it works perfectly. But for 12 volts it gives me above error behavior.

     12 volts into the power supply regulator I suppose? What is the input voltage to the nRF at that point?

  • Hello Edvin,

    Device starts broadcasting with "Dfutarg" name when in bootloader mode. Doesn't that mean it it bootloader mode?

    12volt into power supply regulator and nRF gets 3.3 V . Input regulator can be given variable voltage from 5 volts to 30 volt.  But as I said earlier it works properly for 5 volt only .. i want to know what are the possibilities that could hamper the function?

  • "DfuTarg" means that it is in bootloader mode, yes, as long as you haven't set DfuTarg as the advertising name in your application as well. 

    I don't see why increasing the input voltage should affect the behavior of the application as long as the nRF always receive 3.3V. Are you sure the nRF still receive only 3.3V when you try to increase the input voltage to the regulator to 12V? Have you measured?

    The reasons why the device stays in bootloader mode is usually one of the following:

    1: The device doesn't have an application, only a bootloader.

    2: The bootloader is set up to enter DFU mode on a button press on restart. If this is the case, and the button is held (the pin is held low) it will stay in DFU mode. Look for the define NRF_BL_DFU_ENTER_METHOD_BUTTON and NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN in sdk_config.h in your bootloader project.

    3: The present application isn't signed correctly, or wasn't uploaded correctly, leading to a CRC error when the bootloader checks the application. 

    None of these should be dependent on the input on your voltage regulator. In fact, nothing should, as long as the regulator works properly, always supplying 3.3V to the nRF. 

    Can you double check that the input voltage to the nRF doesn't change when you increase the voltage into your input regulator?

Reply
  • "DfuTarg" means that it is in bootloader mode, yes, as long as you haven't set DfuTarg as the advertising name in your application as well. 

    I don't see why increasing the input voltage should affect the behavior of the application as long as the nRF always receive 3.3V. Are you sure the nRF still receive only 3.3V when you try to increase the input voltage to the regulator to 12V? Have you measured?

    The reasons why the device stays in bootloader mode is usually one of the following:

    1: The device doesn't have an application, only a bootloader.

    2: The bootloader is set up to enter DFU mode on a button press on restart. If this is the case, and the button is held (the pin is held low) it will stay in DFU mode. Look for the define NRF_BL_DFU_ENTER_METHOD_BUTTON and NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN in sdk_config.h in your bootloader project.

    3: The present application isn't signed correctly, or wasn't uploaded correctly, leading to a CRC error when the bootloader checks the application. 

    None of these should be dependent on the input on your voltage regulator. In fact, nothing should, as long as the regulator works properly, always supplying 3.3V to the nRF. 

    Can you double check that the input voltage to the nRF doesn't change when you increase the voltage into your input regulator?

Children
  • Are you sure the nRF still receive only 3.3V when you try to increase the input voltage to the regulator to 12V? Have you measured?

    Yes i've measured voltage it is received 3.3 V.  I am facing issue after flashing secure boot loader code. Application without boot loader has no complaints in functionality. 

    Can you double check that the input voltage to the nRF doesn't change when you increase the voltage into your input regulator?

    Supply voltage do not change while increasing input voltage. I have crosschecked just now.

    define NRF_BL_DFU_ENTER_METHOD_BUTTON and NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN

    Both of these methods are already  disabled. Still issue remains same. 

    I wonder what exactly had happend after flashing boot loader code?? and increasing supply get this issue.

    Is there any other electrical requirements that need to  be fulfilled other than 3.3  V supply. Or any  related requirements for boot loader code. 

    Thanks and regards

  • I am also facing issue of device not getting reset after firmware update is completed . Mobile application show that firmware updated successfully, but device does not get reset and not even stays in boot loader mode as i don't see any Dfutarg advertising name in mobile application.

  • Are you sure this is related to the input voltage at all? Does everything work when you use 5V? Can you successfully update the application?

    Don't you agree if the input voltage to the nRF doesn't change, and nothing else, as seen from the nRF changes, then the behavior shouldn't change?

    Are you sure that the DFU part is working properly when you use the 5V in?

  • Are you sure that the DFU part is working properly when you use the 5V in?

    Yes i have tested it for multiple times and Dfu process done successfully with valid FW updates. 

    Don't you agree if the input voltage to the nRF doesn't change, and nothing else, as seen from the nRF changes, then the behavior shouldn't change?

    Yes i do agree to this statement but i am facing issue.. and no clues for why this is so happening.

    Can you successfully update the application?

    YES I can. 

    Can it be related to RAM and FLASH memory managements. My application code is modified code of Multiperipheral example . Which has following Section_placement MACRO settings:

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x80000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x10000

    FLASH_START=0x26000

    FLASH_SIZE=0x5a000

    RAM_START=0x200053F0

    RAM_SIZE=0xAC20

    Where for secure_bootloader ble example code has following Section_placement MACRO settings:

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x80000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x10000

    FLASH_START=0x72000

    FLASH_SIZE=0x8000

    RAM_START=0x200057b8

    RAM_SIZE=0xa848

    Is there anything wrong in this ?

  • Are you sure this is your settings?

    In the Bootloader examples for the nRF52832 examples from the SDK uses the following settings for the Flash:

    FLAS_START = 0x78000

    FLASH_SIZE = 0x6000

    Using these settings the bootloader will use the flash area 0x78000 to 0x7E000. The remaining flash is for the bootloader settings. 

    In theory, it is possible with the settings you have used as well, but it has to be set several places in the project, so it is easy to do mistakes. 

    Try to revert the bootloader settings settings to 0x78000 and 0x6000, and see if that changes anything. But then again, this should not be dependent on the voltage into your external voltage regulator.

    What is it that you are trying to update? The app + bl? Have you tried to debug the bootloader to figure out why the application is not starting? To do so, you should use the pca10040_ble_debug and enable logging and see if you get any sensible output.

    Are there any other changes you have done to the bootloader project that I should know of?

    Best regards,

    Edvin

Related