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

BL652 (nRF52832) SoftDevice and DAPLink issue

Morning,

I ve try to flash the hex pca10040 from the examples/ble_peripheral/ble_app_hrs without success, with the flash seems ok, i can t see the device.

So as i ve a custom board with a led on pin15, i ve change the blinky example for this :

#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "boards.h"

/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

void Delais(void)
{
    unsigned int i,j;
    for(i=0;i<2000;i++) for(j=0;j<1000;j++);
}

/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

int main(void)
{
    NRF_P0->DIR |= 1<<15;
    NRF_P0->OUT |= 1<15;

    while(1)
    {
        Delais();
        NRF_P0->OUT ^= 1<<15;
    }
}

after a success build i ve flash the blank file with python nrfjprog_cli.py program --file ../examples/peripheral/blinky/pca10040/blank/armgcc/_build/nrf52832_xxaa.hex --eraseall --verify --systemreset --daplink And the led is blinking.

but if i try to flash the one with the soft device (s132), it didn't run. So it s look like the soft device isn t well flash ...

So i ve try with flashing softdevice first. Without success. I ve also try to merge hex with mergehex. Without success.

EDIT: After removing optimization flag, the loop isn t optimised and the delay works. So using s132 build with mergehex works.

But i can t make any ble_peripheral example works

Any ideas ? Thankx

  • @khertan : Do you have 32kHz crystal on your custom board ? If you don't you have to modify the definition of NRF_CLOCK_LFCLKSRC to select the source from NRF_CLOCK_LF_SRC_RC instead of NRF_CLOCK_LF_SRC_XTAL.

    Note that after you flash the softdevice, you don't have to merge the softdevice with the application. You only have to flash the softdevice once.

Related