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

Difficulty getting s132 SoftDevice working with UART example (uVision)

To start off here, I'm using a Laird DVK-BL652-1.0, which according to Laird only needs to be re-configured to use the internal oscillator, but is otherwise very similar to the PCA10040. I've done this and run the "blinky" example successfully (blinky lights and all), and made similar changes to the UART example, but can't get it to run.

Initially, I started with the 13.1.0 SDK -> BLE_APP_UART -> PCA10040 -> s132 -> arm5_no_packs (using keil uVision 5), however adding the software packs turned into a constant game of "add the packs, header not found, find/ install the pack it was looking for, repeat" - and it was difficult to build/ flash the soft device and application from separate projects

I eventually got fed up, and used Pack Installer - figuring a pre-made package would be easier. I looked under device, nRF52832_xxAA, and downloaded the ble_app_uart_s132_pca10040 example. Made the changes to the oscillator, batch compiled successfully, flashed the soft device (flash_s132_nrf52_2.0,0-7.aplha), flashed the application... but zero activity from the device. https://flic.kr/p/WvuuWf

Weirdly, after this first attempt, which was based on a build with 0 errors, 0 warnings, the next time around it doesn't show all of the packs, and fails to find nordic_common.h... any help here? https://flic.kr/p/VQ6rTW

I'm mostly using uVision since Nordic shows support.. is there a "better" or more common tool to use? I'm frustrated that I can't get a pre-made example to flash and run.

Thank you, Andrew

Update based on question: I don't get any errors opening the project, and the application layer "nrf52832_xxaa" compiles fine, however when I try to compile the soft device (flash_s132_nrf52_4.0.2_softdevice) I get the following error. Attempting to dig for "nordic_common.h" and adding it to the include path just makes one more header not come up.. and then another, etc. etc. which is what originally led me to try Keil's pack installer. I'm running uVision V5.23.0.0 by the way ......\main.c(53): error: #5: cannot open source input file "nordic_common.h": No such file or directory #include "nordic_common.h" ......\main.c: 0 warnings, 1 error "............\components\softdevice\s132\hex\s132_nrf52_4.0.2_softdevice.hex" - 1 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:00

  • FormerMember
    0 FormerMember

    To make the BLE examples in SDK 13.1 work "out-of-the-box", S132 v.4.0.x should be used.

    When opening an example in the SDK, it should not be necessary to add the required files, they are already included in the project (also when using the arm5_no_packs version). Was there any errors when opening the project?

  • I don't get any errors opening the project, and the application layer "nrf52832_xxaa" compiles fine, however when I try to compile the soft device (flash_s132_nrf52_4.0.2_softdevice) I get the following error. Attempting to dig for "nordic_common.h" and adding it to the include path just makes one more header not come up.. and then another, etc. etc. which is what originally led me to try Keil's pack installer.

    I'm running uVision V5.23.0.0 by the way

    ......\main.c(53): error: #5: cannot open source input file "nordic_common.h": No such file or directory #include "nordic_common.h" ......\main.c: 0 warnings, 1 error "............\components\softdevice\s132\hex\s132_nrf52_4.0.2_softdevice.hex" - 1 Error(s), 0 Warning(s). Target not created. Build Time Elapsed: 00:00:00

  • FormerMember
    0 FormerMember in reply to FormerMember

    I'm not sure if I understand what you mean by "try to compile the softdevice". Anyway, the normal way to do it is to program the application and the softdevice separately:

    1) Program the softdevice using nRFgo studio or nrfjprog from cmd. The softdevice is a pre-compiled hex-file and nothing needs to be done to it before programming it.

    2) Program the application.

    Does that work on your side?

  • I understand that it's a hex file, however I was underthe impression I still needed to run a build in Keil and then load it.

    In any case.. uVision still won't load the soft device. I get Error: Flash Download failed - could not load file.

    It appears the hex file is in the SDK - could you let me know what I should be seeing here? I'm also trying to use nRFgo (which isn't clear on how to load the softdevice) and nrfjprog

  • Figured this one out - when using Keil, do not run a build on the soft-device. Doing so will wipe out the old hex, and since the the flash target was never meant to be compiled, it won't generate a new one. If you've done the same thing I have, just put a replacement hex file in the folder and flash it, then build and flash your application.

    www.nordicsemi.com/.../115611

Related