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

SVC Handler Missing

I am trying to get the Heart Rate example in the nRF51 SDK to work (found in ...nrf51822/board/nrf6310/ble/ble_app_hrs). It fails at line 338 in main.c (at the call sd_ble_gap_device_name_set) with an error code of 1, which, according to nrf_error.h, is a "SVC Handler is Missing".

Here is my setup:

Windows 7, Keil uVision V5.05.15, nRF51 SDK: version v5_0_0_34603 Softdevice: s110_nrf51822_5.2.1 Board: PCA10005

I believe I have followed the User Guide exactly. I have not made any changes to the source code or the project settings. I was careful to program the softdevice with nRFgo Studio, before using Keil to flash the application. I also tried allowing nRFgo Studio to flash both the application and the softdevice.

I have even tried using a GNU tool chain from the command line, and also allowing Eclipse to build the application per the nAN-29 document. All efforts lead to the same error being returned from line 338 in main.c.

I am stuck. Any help at this point would be very welcome.

Thank You Dal

Parents
  • Hi Lionel, Instructions stolen from another thread here. BR, Donal

    There could be several reasons for this, but the most common two are:

    1. That the chip is in system off. When the chip is in this mode, it is not accessible to the debugger, and hence any download will fail. You can either wake it up in some way (pressing a button configured as a wake-up, reset or similar), or use nRFgo Studio's Recover functionality. If nRFgo Studio finds a programmer, but can't communicate with the chip, it will offer to try a recovery. This will erase all contents on the chip, and in that way ensure that it doesn't enter system off again.

    2. That you try to flash a program on top of the softdevice If you have programmed the softdevice into the chip (which occupies the flash from address 0x0 to 0x14000), and then try to program an application in this same space (i.e. an application not meant for use with the softdevice), you may see this error.

    Again, there are two ways to fix this: a. Erase the softdevice. b. Choose the nRF51822_xxyy_s110 target from the dropdown next to the Download button in Keil. All the non-BLE examples in the SDK come with project settings so that they can be used both with and without the softdevice programmed. If you set this to one of the _s110 targets, the application will be moved from address 0x0 to address 0x14000, meaing it will work nicely on top of the softdevice, even though it doesn't use it.

Reply
  • Hi Lionel, Instructions stolen from another thread here. BR, Donal

    There could be several reasons for this, but the most common two are:

    1. That the chip is in system off. When the chip is in this mode, it is not accessible to the debugger, and hence any download will fail. You can either wake it up in some way (pressing a button configured as a wake-up, reset or similar), or use nRFgo Studio's Recover functionality. If nRFgo Studio finds a programmer, but can't communicate with the chip, it will offer to try a recovery. This will erase all contents on the chip, and in that way ensure that it doesn't enter system off again.

    2. That you try to flash a program on top of the softdevice If you have programmed the softdevice into the chip (which occupies the flash from address 0x0 to 0x14000), and then try to program an application in this same space (i.e. an application not meant for use with the softdevice), you may see this error.

    Again, there are two ways to fix this: a. Erase the softdevice. b. Choose the nRF51822_xxyy_s110 target from the dropdown next to the Download button in Keil. All the non-BLE examples in the SDK come with project settings so that they can be used both with and without the softdevice programmed. If you set this to one of the _s110 targets, the application will be moved from address 0x0 to address 0x14000, meaing it will work nicely on top of the softdevice, even though it doesn't use it.

Children
Related