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

program restart on BOARD_PCA10001

I copied the example "ble_app_hrs_s110_pac10028(nRF51 PCA10028)"in the nRF51 sdk 10.0.0. I Changed the configuration to make it run on BOARD_PCA10001. But the program keep restarting all the time! The picture shows more detail!image description(/attachment/5020c2db17102491217f9af24f2f339c)(/attachment/6b942317563b99f33f2adff9478529f5)

The program restart when It runs into buttons_leds_init(&erase_bonds); I feel It is really inconvenient to use BOARD_PCA10001! Change the define in c/c++ tag to BOARD_PCA10001 can not make the example program run or even build crrectly. Maybe the err_code would be helpful

  • Hi,

    First of all, the PCA10001 ships with a nRF51822 QFAAG0. This is a 2nd revision IC which is not compatible with SDK 10. Refer to the Compatibility matrix. Reasons for incompatibility issues are described here. However, I tried it and it actually built and ran perfectly fine on my PCA10001 board using the ble_app_hrs_s110_pac10028 example and Softdevice S110 V8.0.0.

    1. Yes, the err_code might be useful. If you haven't already, you can find it using this method.
    2. What SoftDevice are you using?
    3. What build errors do you get?
    4. Did you try to attach more than one image? I only see one and it seems like you might have tried to attach two more?
  • Thank you to answer me! I use s110_nrf51_8.0.0_softdevice.hex I changed the board support to BOARD_PCA10001,and modified nrf_drv_config.h with this:

    /* GPIOTE */
    #define GPIOTE_ENABLED 1
    /* UART */
    #define UART0_ENABLED 1
    

    and build no error and warning. the err_code began not equal to 0 but 0x00000004 when program runs into app_button_init(...) function 111 lines in app_button.c and the run to the NVIC_SystemReset in app_error_handler

  • Strange. I'm not able to reproduce this here, but I suspect that something is going on in the gpiote channel allocation. This is because inside the function app_button_init() there is a call to the function nrf_drv_gpiote_in_init() which might return error 4 (NRF_ERROR_NO_MEM). Try to look inside nrf_drv_config.h and check the value of GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS. I seem to recall that this value has been causing problems like this before. My value is 4.

    If this is not the solution are you able to upload your code?

  • I fixed it! I create the project by click the COPY in Keil, Pack Installer and there are two more place to modify! in the nrf_drv_config.h file #define GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS 4 in the pstorage_platform.h file #define PSTORAGE_NUM_OF_PAGES 2

    I tried to Open the example project In the SDK documents downloaded myself and change device and support board in the target option. It runs perfectly! So there are some difference between the SDK10 in Nordic official and Keil Pack Installer!

Related