This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Code Compatibility Issues with nRF51822 and nRF51422

Hi all,

I am facing a weird issue trying to achieve DFU over the air with the dual-blank DFU. I had integrated DFU with my application(Background story here.) The application hex file, app.hex was merged with s110 softdevice.hex, dual blank bootloader.hex, app_valid_setting_apply.hex. The combined hex file was flashed to nRF51422(QFACA10) Development Kit. The code worked I am able to do DFU OTA from my phone without any issues.

I am using the same hex file to flash an external hardware module, MDBT-40 , but the same file is not working. (Device is not advertising the name). The module contains a nRF51822 QFACA10(256KB Flash, 32KB RAM). I have flashed the device with same other hex files and it works fine. I have flashed the same app.hex(integrated with DFU) with s110 softdevice.hex(without dual blank bootloader hex file and settings hex file) and module works as expected(with DFU OTA failing because of lack of a bootloader). So I am ruling out any hardware issues with the module.

Can anyone tell me why there is a issue when I am flashing a code on nRF51822 chip which works perfectly on nRF51422.

Edit 1:

10mins after I posted the question, I think I figured out the issue. The module did not contain external 32.768KHz crystal, so clock source was wrongly configured in Dual blank Bootloader project(It was properly configured in app.hex). I changed the clock source and it fixed the problem.

Currently the module, advertises properly, but I am not able to do DFU OTA, because once I choose the application hex file from phone, the device timesout with a GATT CONN TIMEOUT Error after it starts sending firmware to characteristic from phone. Its stuck at 0%. So currently update via phone is not possible.

Edit 2:

After updating the clock settings to SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL); I am having issues getting updating DFU OTA on Nordic Development Kit also. So I think changing clock settings in Dual Blank Bootloader has definitely messed up something. I am not able to figure out what it is though...

Can anyone suggest why this problem is there and any possible fixes?

  • Hi guys,

    Figured out the issue. The problem was that my custom module did not have the external 32.768KHz crystal.

    So in the dual bank s110 project you need to change

    SOFTDEVICE_HANDLER_APPSH_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true);
    

    to

    SOFTDEVICE_HANDLER_APPSH_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION, true);
    

    as mentioned here and here.

    I had wrongly changed it to

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, NULL);
    

    as I had changed in my main application file.

Related