Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF Connect couldn't find the device of nRF52811 with a custom board?

Hi,

Intention:

I'd like to build and run  ble_app_uart example application on my custom nRF52811 PCB.

Development Setups:

OS: Windows 10 1803

MDK-ARM Professional Version: 5.23

SDK: nRF5_SDK_15.3.0

J-Link: V6.48a

Schematic: 

Issue Description:

Based on the official tutorial [2], my toolchain has been set up correctly with the UART Example test pass

Now I want to build the ble_app_uart and flash it on my custom PCB with nRF52811 QFN32. Referring to the steps [3] and SDK User Guides [4], the ble_app_uart_pca10056e_s112.uvprojx at .\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_uart\pca10056e\s112\arm5_no_packs is transferred to run natively on nRF52811. In my IDE, the DEVELOP_IN_NRF52840 and NRFX_COREDEP_DELAY_US_LOOP_CYCLES defines are removed from the C/C++ and Asm compile flags. Also Referring to the Problem [1], the NRFX_CLOCK_CONFIG_LF_SRC  - LF Clock Source at [NRFX_CLOCK_ENABLED - nrfx_clock - CLOCK peripheral driver] and CLOCK_CONFIG_LF_SRC  - LF Clock Source at [NRF_CLOCK_ENABLED - nrf_drv_clock - CLOCK peripheral driver - legacy layer] in [nRF_Drivers] Option are chosen from XTAL to RC.

After that I compile the application with ".\_build\nrf52811_xxaa.axf" - 0 Error(s), 0 Warning(s)." in Build Output.

Then run make flash_softdevice && make flash and the custom PCB seems to be flashed because I do not get any errors and J-Link RTT Viewer shows "<info> app: Debug logging for UART over RTT started.".

The issue is that any bluetooth device named "Nordic" couldn't be found in nRF Connect App on Pixel.

Questions: 

Does anyone have a clue what I am doing wrong?

Are there any other steps regarding to [3] which I am missing or any other configs regarding to [4] which I need change?

Best regards

Long

References:

[1] Tooling for custom nRF52811 PCB based on ARM-GCC and PCA10040.

[2] nRF5 Series: Developing on Windows with ARM Keil MDK.

[3] Programming an application.

[4] Developing for nRF52811.

Parents
  • 1. I see that you have a 32KHz crystal in your design, so why do you want to use LF RC? If you configure the project to use LFRC you must also set correct settings for the calibration interval: https://devzone.nordicsemi.com/f/nordic-q-a/45610/how-to-change-ble_app_uart-example-to-work-without-lfclk/179519#179519

    2. Are you able to figure out if the problem lies with the firmware or the custom hardware? Can you flash the firmware on a development board you know is working.

    3. Can you try to flash any of the precompiled hex files in the SDK to see if they work?

    4. Can debug the firmware to see if it's actually able to initialize the softdevice and start advertising? Use the debugging tool in the IDE you are using and check for any asserts.

    5. A common mistake is to solder the HF crystal the wrong way.

  • Reply 1: After checking the Tooling for custom nRF52811 PCB based on ARM-GCC and PCA10040, I thought  there might be something wrong with the  external LF oscillator. So I want to use LF RC to rule out the external LF oscillator failure possibility.

    But at the very beginning, I just left sdk_config.h default config. After  the same procedure, there wasn't any bluetooth device named "Nordic" in nRF Connect App either. And I'v checked the pcbdoc again, the board has two external crystal referring to the official nrf52811_qcaa_dcdc design.

    Reply 2: I couldn't locate the problem. But I could deploy SDK_DIR\examples\ble_peripheral\ble_app_uart\pca10040\s132\arm5_no_packs\ble_app_uart_pca10040_s132.uvprojx to  my custom nRF52832 board.

    Reply 3: I tried to  flash SDK_DIR\examples\ble_peripheral\ble_app_uart\hex\ble_app_uart_pca10056e_s112.hex and SDK_DIR\examples\ble_peripheral\ble_app_beacon\hex\ble_app_beacon_pca10056e_s112.hex, both don't work.

    Reply 4: When debugging, the code falls on NRF_BREAKPOINT_COND in app_error_fault_handler(). It seems that the program couldn't debug with BLE program.

    Reply 5: Could you please explain the wrong way in detail?

  • If the board can't run the precompiled hex files the issue has to be hardware related, since the hex files are known to work on the chip.

    Start with the blinky example in the SDK (examples\peripheral\blinky) and see if this is working. Then start the HF crystal and see if it's running. Then start the LFXO and see what happens. The RTC example is a good starting point for this (examples\peripheral\rtc).

    When debugging, start with a break point in the top of main, and continue down the list. Check the return value and see if they all return with NRF_SUCCESS. If not you might get a hint on what is wrong by checking the return value.

Reply
  • If the board can't run the precompiled hex files the issue has to be hardware related, since the hex files are known to work on the chip.

    Start with the blinky example in the SDK (examples\peripheral\blinky) and see if this is working. Then start the HF crystal and see if it's running. Then start the LFXO and see what happens. The RTC example is a good starting point for this (examples\peripheral\rtc).

    When debugging, start with a break point in the top of main, and continue down the list. Check the return value and see if they all return with NRF_SUCCESS. If not you might get a hint on what is wrong by checking the return value.

Children
No Data
Related