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

BLE RF is not working on nRF52833 (migration from nRF52840)

Hi Community,

Facing the RF functionality issue on nRF52833 on our custom board.

Our board is functioning well with nRF52840, then it failed after migration to nRF52833.

I've done some testing over example ble_app_beacon, and here are the findings (with some modification on main.c, see .diff file as enclosed):

1. HFCLK is not running via enabling by SoftDevice

2. HFCLK is running by self-programmed (manually enable it via 'nrf_drv_clock_hfclk_request')

3. With both 2 setup as above, I can't scan beacon signal from nRF Connect APP from my phone

Crossing check w/ nRF52833 Development Kit board:

1. 'ble_app_beacon' is running well on this board without any changes to main.c. The beacon signal can be discovered by nRF Connect APP on my phone.

2. adding extra change for checking the status of clock (see .diff file as enclosed), it shows HFCLK is not running. (Why? Beacon can be discovered)

3. with manually enabling (enable MACRO MANUAL_CLK_INIT to request HFCLK), HFCLK is running (with check call to 'nrf_drv_clock_hfclk_is_running'). Beacon is functioning well.

So, my question is that how do I get more information to diagnose this weird issue, either hardware side or software side.

BTW, the migration from nRF52840 to nRF52833 is keep the same components (clocks, chip antenna) and with RF matching modified according to reference circuit '7.3.18 Circuit configuration no. 6 fro CJAA WLCSP' with 32.768kHz is equipped.

The log from modification of main.c of ble_app_beacon running on our custom board:

1. With MANUAL_CLK_INIT macro defined

SEGGER J-Link V6.86f - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00 V1.0, SN=683196507
Process: JLink.exe
<info> app_timer: RTC: initialized.
<info> app: Manual clock init done
<info> app: HFCLK running: y
<info> app: LFCLK running: y
<info> app: LFCLK ACTV SRC: 1
<info> app: LFCLK SRC: 1
<info> app: Beacon example started.

2. Without MANUAL_CLK_INIT macro

SEGGER J-Link V6.86f - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 17 2020 14:43:00 V1.0, SN=683196507
Process: JLink.exe
<info> app_timer: RTC: initialized.
<info> app: Clock init to be done by SD
<info> app: HFCLK running: n
<info> app: LFCLK running: y
<info> app: LFCLK ACTV SRC: 1
<info> app: LFCLK SRC: 1
<info> app: Beacon example started.

diff --git a/examples/ble_peripheral/ble_app_beacon/main.c b/examples/ble_peripheral/ble_app_beacon/main.c
index 0e8c1d7..0d0c1a2 100644
--- a/examples/ble_peripheral/ble_app_beacon/main.c
+++ b/examples/ble_peripheral/ble_app_beacon/main.c
@@ -62,6 +62,8 @@
 #include "nrf_log_ctrl.h"
 #include "nrf_log_default_backends.h"

+#include "nrf_drv_clock.h"
+

 #define APP_BLE_CONN_CFG_TAG            1                                  /**< A tag identifying the SoftDevice BLE configuration. */

@@ -285,6 +287,30 @@ static void idle_state_handle(void)
     }
 }

+/** @brief Function for configuring all peripherals used in this example.
+ */
+#define MANUAL_CLK_INIT
+
+#ifdef MANUAL_CLK_INIT
+static void clock_init(void)
+{
+    nrf_drv_clock_hfclk_request(NULL);
+    while (!nrf_drv_clock_hfclk_is_running())
+    {}
+    #if 0
+    // Start 64 MHz crystal oscillator.
+    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
+    NRF_CLOCK->TASKS_HFCLKSTART    = 1;
+
+    // Wait for the external oscillator to start up.
+    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
+    {
+        // Do nothing.
+    }
+    #endif
+    NRF_LOG_INFO("Manual clock init done");
+}
+#endif

 /**
  * @brief Function for application main entry.
@@ -295,10 +321,20 @@ int main(void)
     log_init();
     timers_init();
     leds_init();
+    #ifdef MANUAL_CLK_INIT
+    clock_init();
+    #else
+    NRF_LOG_INFO("Clock init to be done by SD");
+    #endif
     power_management_init();
     ble_stack_init();
     advertising_init();

+    NRF_LOG_INFO("HFCLK running: %s", (nrf_drv_clock_hfclk_is_running () ? "y" : "n"));
+    NRF_LOG_INFO("LFCLK running: %s", (nrf_drv_clock_lfclk_is_running () ? "y" : "n"));
+    NRF_LOG_INFO("LFCLK ACTV SRC: %d", nrf_clock_lf_actv_src_get ());
+    NRF_LOG_INFO("LFCLK SRC: %d", nrf_clock_lf_src_get ());
+
     // Start execution.
     NRF_LOG_INFO("Beacon example started.");
     advertising_start();

Parents
  • Sorry for the late reply DKC,

    I am not sure what the problem in starting your device, but i will try to apply your changes on the nRf52833 kit to see if i find attempt to see any differences. Is the main.c is the only file you changed or do you see that the sdk_config.h might have some differences as well?

  • Hi,

    I've done another test (radio_test example). And found that I can't have my custom board to transmit or receive packet by another PCA10100 DK board.

    So, does this mean a hardware fault in our board design or in nRF52833 chip?

  • have you added the nrf_drv_clock_init as i suggested in my previous reply? doing so makes it work properly on the nRF52833 DK here on my desk. So the issue is not with the chip itself and is likely to be in your board.

  • I added 'nrf_drv_clock_init()' as you mentioned.

    The beacon is still not working on my custom board.

    I believe that there is something wrong with my board, but do you have other suggestion for further diagnostic?

    +/** @brief Function for configuring all peripherals used in this example.^M
    + */^M
    +#define MANUAL_CLK_INIT^M
    +^M
    +#ifdef MANUAL_CLK_INIT^M
    +static void clock_init(void)^M
    +{^M
    +    uint32_t err_code = NRF_SUCCESS;^M
    +    err_code = nrf_drv_clock_init();^M
    +    APP_ERROR_CHECK(err_code);^M
    +^M
    +    nrf_drv_clock_hfclk_request(NULL);^M
    +    while (!nrf_drv_clock_hfclk_is_running())^M
    +    {}^M
    +    #if 0^M
    +    // Start 64 MHz crystal oscillator.^M
    +    NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;^M
    +    NRF_CLOCK->TASKS_HFCLKSTART    = 1;^M
    +^M
    +    // Wait for the external oscillator to start up.^M
    +    while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)^M
    +    {^M
    +        // Do nothing.^M
    +    }^M
    +    #endif^M
    +    NRF_LOG_INFO("Manual clock init done");^M
    +}^M
    +#endif

  • I think something is wrong with your board. I tried your exact patch on my desk and it worked here after adding nrf_drv_clock_init. Check your XTAL and the schematics/layouts around it. It seems like the XTAL is not starting.

  • Hi,

    Double checking the difference between PCA10100 and our custom board in ANT part, the only difference is that we're using WLCSP package, while aQFN73 is used in PCA10100. We do have RF matching as suggested in reference design of Config. 6 of WLCSP type package.

    Is there any other change specifically in software (softdevice and sdk_config.h ...etc) required for chip selection of WLCSP?

    BTW, I've also done the radio_test program to confirm that my custom board didn't have RF functioning at all. The same radio_test firmware and cli command steps can works on PCA10100 board.

Reply
  • Hi,

    Double checking the difference between PCA10100 and our custom board in ANT part, the only difference is that we're using WLCSP package, while aQFN73 is used in PCA10100. We do have RF matching as suggested in reference design of Config. 6 of WLCSP type package.

    Is there any other change specifically in software (softdevice and sdk_config.h ...etc) required for chip selection of WLCSP?

    BTW, I've also done the radio_test program to confirm that my custom board didn't have RF functioning at all. The same radio_test firmware and cli command steps can works on PCA10100 board.

Children
No Data
Related