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

BLE Central UART example for PCA10059 (nRF52840-dongle)

Will there be an example of the Nordic UART Service in the central role for the PCA10059 (nRF52840-dongle)?  If so is there any timeline on release?

Parents Reply
  • Which I am trying to do and have created an ugly mess.  To make this all that much more fun the debugger seems to be refusing to stop at main.

    My compiler is IAR EWARM.  My hardware is (now changed to be) the PCA10056 board so I'm using the built-in Jlink.

    When I start debugging the code immediately runs and creates the CDC device (as shown in the Win7 Device Manager window) but I can't open the device.

    It is this weeks long effort of getting a BLE NUS Central with USB working that I was hoping Nordic would create as an example.

Children
  • It seems like that you have not flashed the softdevice.  Try flashing softedevice first then debug your app.  Also check the linker mapping.  Firmware using softdevice starts at a different location where non SD firmware starts at zero.

  • Flashing S140 soft device from IAR succeeded but verifying soft device from nRFgo Studio failed so I re-flashed from nRFgo Studio.  Now the code doesn't run at all.  Gets stuck in app_usbd.c in APP_ERROR_HANDLER()

    #if APP_USBD_CONFIG_POWER_EVENTS_PROCESS
    ret = nrf_drv_power_init(NULL);
    if ((ret != NRF_SUCCESS) && (ret != NRF_ERROR_MODULE_ALREADY_INITIALIZED))
    {
    /* This should never happen */
    APP_ERROR_HANDLER(ret);
    }
    #endif

    Thanks for the hint.  Now I'll track down this problem.

  • Are you using Options->Debugger->Images to add the SoftDevice hex file to the programming step? We find when doing so that the Erase All box is not available, which forces a chip erase from nRFgoStudio after which IAR will work correctly, albeit with an extremely slow flash download. IAR 8.32.2 This has become so tedious we are switching to SES despite having paid $thousands

    The erase step is required as the debugger cannot be restarted (our experience) without a full erase.

  • I am on EWARM 8.30.1.17148 but I am not using Options->Debugger->Images the settings.  Once the soft device is downloaded it shouldn't need to be downloaded again unless the nRF52 gets chip erased.  There is an option in EWARM to download a file that I generally use although it seems that might be broken now. {Project} {Download} {Download File ...} is what I have used in the past but it seems to have had a problem this time around.

    Restart after a breakpoint is hit or miss: the Monitor Mode debugging at least works some of the time.

  • Ah, I see .. the Erase and Download File only seem to work on our version with Debugger->Download-> Use Flash Loader unchecked; we don't have any .d or .out Softdevice files, only the issued .hex files and are reluctant to use our own conversion although I suppose we could. We can also uncheck the extra hex file option after the first session, which speeds up things. Now that your comments focus my mind, I realise that not using the flash loader works much better all round, no idea why ..

Related