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

DFU clock and custom made board

I am using nrf51422 sdk v8.0 on pca10028 kit and softdevice s110. My DFU and custom made application works fine when i use clock SOFTDEVICE_HANDLER_APPSH_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, true). Then i transferred my codes to my custom made board but all codes work there when i change clock to SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION , NULL). But now i want to add DFU to my custom board. i changed the clock to SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION , NULL). in dfu_dual_bank_ble_s110_pca10028 an example project from keil packs. dfu advertise nicely but when i try to upload my application there comes an error "the connection has been lost". Can someone point the error is it because of clocks or something wrong in my code.?

  • Hi Nomi, Could you explain why you switch from SOFTDEVICE_HANDLER_APPSH_INIT to SOFTDEVICE_HANDLER_INIT ? Have you also removed the scheduler in the code ?

  • sorry it isnt SOFTDEVICE_HANDLER_APPSH_INIT. I used SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL); . The clock already used in dfu_dual_bank_ble_s110_pca10028 example. But on my custom board my codes work when i change clock to SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION , NULL). Now when i change clock in pca10028 dfu does not work.

  • Let me see if I get what you mean:

    1. with pca10028, both XTAL_20_PPM and RC_250_PPM_TEMP_4000MS_CALIBRATION source works

    2. with custom board, RC_250_PPM_TEMP_4000MS_CALIBRATION works but XTAL_20_PPM doesn't work

    Is this correct? If yes, do you have a 32KHz crystal on your custom board ? If not you can not use the XTAL_20_PPM clock source

  • Hi Nomi,

    Please be more specific on what doesn't work.

  • 1-On pca kit all codes work with both clocks execpt dfu_dual_bank_ble_s110 with RC_250_PPM_TEMP_4000MS_CALIBRATION. Which advertise nicely but when i connect to dfu to upload my custom application or hrs_s110_8_0_sdk_8_0.zip an already present file in nrf toolbox dfu section from ios app the error comes dfu connection has been last. 2-on custom made as i dont have any crystal so RC_250_PPM_TEMP_4000MS_CALIBRATION works. So first i test my codes on my pca kit then i chage its clock and then transfer it on my custom board. Every thing was working fine until i got stuck on dfu dual bank ble example which works perfectly on pca with XTAL_20_PPM advertises nicely and i can upload my custom applications. But when i changes its clock to RC_250_PPM_TEMP_4000MS_CALIBRATION so that i can burn it to my custom board when i try to upload my custom application dfu connection has been last error comes.

Related