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

Wake-on-NFC for PCA10059 (Dongle)

Hi,

I am no programmer, but I wanted to try the Wake-on-NFC example on the 52840 dongle (I soldered an NFC flex on pins P0.09 and P0.10). I have downloaded SES and nRF SDK 16.0.0. As there is no such example for the PCA10059 board I took the example for PCA10056 and changed the board setting to BOARD_PCA10059. Everything fine so far, links to board.c seems ok pointing to correct board. I am unsure if I need to do anything more in the code, but I tried to build and that went ok. Then when I try to progam the hex using the nRFConnect I get  specified sdReq does not match current SoftDevice. Googling I found that the softdevice need to be programmed as well. Trying around I think I got it to work by first programming the softdevice (which seems to be version S140 v 7.0.1, 0xCA), then clearing the hex and adding the application hex and then specifying 0xCA in the "custom field" of the list of soft devices that comes up (v7.0.1 is not listed). That seems to work, is that the correct procedure? I attached the log.

2020-03-13T14:26:25.692Z INFO Application data folder: C:\Users\xyz\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
2020-03-13T14:26:25.918Z DEBUG App pc-nrfconnect-programmer v1.3.1 official
2020-03-13T14:26:25.919Z DEBUG App path: C:\Users\xyz\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
2020-03-13T14:26:25.919Z DEBUG nRFConnect 3.3.0 is supported by the app (^3.3.0)
2020-03-13T14:26:25.919Z DEBUG nRFConnect path: C:\Users\xyz\AppData\Local\Programs\nrfconnect\resources\app.asar
2020-03-13T14:26:25.920Z DEBUG HomeDir: C:\Users\xyz
2020-03-13T14:26:25.920Z DEBUG TmpDir: C:\Users\xyz~1\AppData\Local\Temp
2020-03-13T14:26:25.978Z INFO Using nrfjprog library 10.5.0, pc-nrfjprog-js 1.6.0
2020-03-13T14:26:32.509Z INFO Using USB SDFU protocol to communicate with target
2020-03-13T14:26:32.543Z INFO Protocol Version:  1 found
2020-03-13T14:26:32.546Z INFO Hardware: 52840 found
2020-03-13T14:26:32.551Z INFO Firmware: Bootloader found
2020-03-13T14:26:32.551Z INFO Firmware: Application found
2020-03-13T14:26:40.365Z INFO Parsing HEX file:  C:\Projects\Nordic_files\nRF5_SDK_16.0.0_98a08e2\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex
2020-03-13T14:26:40.388Z INFO File was last modified at  8/28/2019, 4:02:28 PM
2020-03-13T14:26:40.517Z INFO Data block: 0x00000000-0x00000B00 (0x00000B00  bytes long)
2020-03-13T14:26:40.517Z INFO Data block: 0x00001000-0x00026598 (0x00025598  bytes long)
2020-03-13T14:26:40.521Z INFO SoftDevice detected, id 0xCA (S140 v7.0.1)
2020-03-13T14:26:43.422Z INFO Does not need to be reloaded:  C:\Projects\Nordic_files\nRF5_SDK_16.0.0_98a08e2\components\softdevice\s140\hex\s140_nrf52_7.0.1_softdevice.hex
2020-03-13T14:26:43.427Z INFO SdReq for SoftDevice is set as 0x00.
2020-03-13T14:26:43.429Z INFO Hash is generated by SHA256
2020-03-13T14:26:43.431Z INFO Performing DFU. This may take a few seconds
2020-03-13T14:26:43.457Z INFO DFU procedure starts. This may take a few seconds.
2020-03-13T14:26:51.970Z INFO DFU for SoftDevice completed successfully!
2020-03-13T14:26:51.971Z INFO 0 dfu package(s) left.
2020-03-13T14:26:51.971Z INFO Waiting for device
2020-03-13T14:26:52.980Z INFO All dfu images have been written to the target device.
2020-03-13T14:26:52.981Z INFO Using USB SDFU protocol to communicate with target
2020-03-13T14:26:52.988Z INFO Protocol Version:  1 found
2020-03-13T14:26:52.990Z INFO Hardware: 52840 found
2020-03-13T14:26:52.996Z INFO Firmware: Bootloader found
2020-03-13T14:26:52.996Z INFO Firmware: SoftDevice found
2020-03-13T14:26:53.014Z INFO SoftDevice detected, id 0xCA (S140 v7.0.1)
2020-03-13T14:27:00.161Z INFO Parsing HEX file:  C:\Projects\Nordic_files\nRF5_SDK_16.0.0_98a08e2\examples\nfc\wake_on_nfc\pca10059_custom\blank\ses\Output\Release\Exe\wake_on_nfc_pca10059_custom.hex
2020-03-13T14:27:00.161Z INFO File was last modified at  3/13/2020, 1:06:58 PM
2020-03-13T14:27:00.194Z INFO Data block: 0x00000000-0x00003A06 (0x00003A06  bytes long)
2020-03-13T14:27:00.195Z INFO Data block: 0x00003A08-0x00003ECA (0x000004C2  bytes long)
2020-03-13T14:27:00.195Z INFO Data block: 0x00003ECC-0x00003F08 (0x0000003C  bytes long)
2020-03-13T14:27:10.718Z INFO Does not need to be reloaded:  C:\Projects\Nordic_files\nRF5_SDK_16.0.0_98a08e2\examples\nfc\wake_on_nfc\pca10059_custom\blank\ses\Output\Release\Exe\wake_on_nfc_pca10059_custom.hex
2020-03-13T14:27:10.721Z INFO Hash is generated by SHA256
2020-03-13T14:27:21.122Z INFO Performing DFU. This may take a few seconds
2020-03-13T14:27:21.128Z INFO DFU procedure starts. This may take a few seconds.
2020-03-13T14:27:23.445Z INFO DFU for Application completed successfully!
2020-03-13T14:27:23.445Z INFO 0 dfu package(s) left.
2020-03-13T14:27:23.445Z INFO Waiting for device
2020-03-13T14:27:28.447Z ERROR Reopen device failed: Timeout while waiting for device  D35164D87A24 to be attached and enumerated
2020-03-13T14:27:28.448Z INFO Nordic DFU Trigger Interface was not found.Please physically reset device.
2020-03-13T14:27:28.452Z ERROR Device not found due to failure during DFU
2020-03-13T14:27:28.464Z INFO Target device closed.

Then we have the slight problem that the wake-on-nfc hack does not seem to work. No LEDs are lit after programming (or after pressing the larger white button, I assume BTN_ID_SLEEP 0 is this button) and the dongle does not respond to NFC. Any suggestions? As above, I copied the 10056 wake-on-nfc project and just changed the board to BOARD_PCA10059 by editing the wake_on_nfc_...emProject file in an editor.

Regards,

Peter

Parents
  • Hi Peter

    Yes, there are quite a few differences between the blinky and the NFC example. The sdk_config.h header file is the configuration file of our SDK examples and includes multiple defines, like if logging should be enabled, what LF clock should be used, and what peripherals should be enabled. You'll need to change this file as well in order to make the NFC project identical to the blinky project.

    Best regards,

    Simon

Reply
  • Hi Peter

    Yes, there are quite a few differences between the blinky and the NFC example. The sdk_config.h header file is the configuration file of our SDK examples and includes multiple defines, like if logging should be enabled, what LF clock should be used, and what peripherals should be enabled. You'll need to change this file as well in order to make the NFC project identical to the blinky project.

    Best regards,

    Simon

Children
No Data
Related