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

How to configure ble_app_beacon example from SDK 9.0.0 for PCA20006?

I'm trying to upload ble_app_beacon example from SDK 9.0.0 to a beacon board (PCA20006) after successfully uploading it to a DK board (PCA10028).

My first step was to connect the beacon to nRF51-DK using a Tag-connect cable, erase the memory using nRFgo studio and upload S110 (s110_softdevice.hex from C:\Keil_v5\ARM\Pack\NordicSemiconductor\nRF_SoftDevice_S110\8.0.2\hex).

I'm rather intrigued that nRFgo studio showed the S110 softdevie as 8.0.0 instead of 8.0.02.

Anyway, the second step was trying to modify the ble_app_beacon code from PCA10028 to PCA20006 in Keil. I made a few modifications in Flash > Configure flash tools

  • Device: to nRF51822xxAA
  • C/C++: use BOARD_PCA20006
  • Target: ROM (start=0x18000; size=0x40000); RAM (start=0x20000000; size=0x8000); Xtal=16.0
  • Debug: J-Link/J-TRACE Cortex

I received two errors when building the project.

    compiling nrf_drv_gpiote.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.1\gpiote\nrf_drv_gpiote.c(43): error:  #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined
nrf_drv_gpiote_evt_handler_t handlers[NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS];
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.1\gpiote\nrf_drv_gpiote.c(157): error:  #20: identifier "GPIOTE_CONFIG_IRQ_PRIORITY" is undefined
nrf_drv_common_irq_enable(GPIOTE_IRQn, GPIOTE_CONFIG_IRQ_PRIORITY);
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.1\gpiote\nrf_drv_gpiote.c: 0 warnings, 2 errors
".\_build\nrf51422_xxac_s110.axf" - 2 Error(s), 0 Warning(s).

If I left the device to nRF51422, the error would not appear. I found that there were two different nrf_drv_gpiote.h, one for nRF51422 and the other nRF51822. In nrf_drv_gpiote.h for nRF51422,

#define GPIOTE_ENABLED 1

But in nrf_drv_gpiote.h for nRF51822,

#define GPIOTE_ENABLED 0

When I tried to build using nRF51422 as the device and uploaded the app, the beacon could not be detected by the nRF master control panel on an Android phone. Its LED did not blink either.

What steps have I missed?

Parents
  • The configuration of GPIOTE_ENABLED is example specific. for some example it is needed and for some it is not. If you are using packs then i think disabling GPIOTE_ENABLED for 51822 is a mistake inside the pack manager.

    Please select the device as 51822 and change to

    #define GPIOTE_ENABLED 1
    

    manually.

  • It worked! after changing the ROM and RAM setting as Aryan suggested.

    But why does the setting have to be similar to that for 51422 (for board pca10028) instead of the default for 51822?

    Setting for 51422 is shown below

    IROM1: start=0x18000; size=0x28000 and IRAM1: start=0x20002000; size=0x6000.
    
Reply
  • It worked! after changing the ROM and RAM setting as Aryan suggested.

    But why does the setting have to be similar to that for 51422 (for board pca10028) instead of the default for 51822?

    Setting for 51422 is shown below

    IROM1: start=0x18000; size=0x28000 and IRAM1: start=0x20002000; size=0x6000.
    
Children
No Data
Related