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

nRF52 - Zephyr, boot hangs

Hi,

We are using a BL652 from Laird, embedding a nRF52832. We wanted to give Zephyr a try, but we are facing a problem.

We compiled the blink example, but when we flash the hex file generated by Zephyr and reset the board, nothing happens.

The BL652-DK and the nRF52832-DK have the same pin linked to LED1.

Every example we compiled and flashed on the board has the same behavior: nothing happens.

It seems that the CPU is lost, and doesn't know what to do. Or maybe the bootloader hangs for some reason.

Do we have to change something in order to make zephyr work on the BL652 (maybe the linker script)? Or is the problem deeper?

Best regards, and happy new year to everyone!

  • Hi,

    Did you try following this blog post/guide to get started with Zephyr on nRF5x devices? I do not have a BL652 device available, but I teste with the nRF52 DK and that works as expected.

    BL652 is not listed as a board supported by Zephyr, so you should maybe ask the developers if there is any plans to support this module, or if there are some problems related to this.

    Does your board have a 32 kHz crystal oscillator? If not, it might cause some errors in the initialization. Have you checked with the terminal if there are any output from the device? I tested the Bluetooth Beacon example described in the above linked guide and this prints some status messages to the terminal.

    Best regards,

    Jørgen

  • Hi,

    Thanks for your answer. I read this blog, and the zephyr project documentation.

    I thought that because the BL652 contains a nRF52832, every would have been fine (except with the gpio being different, but that should be easy enough).

    I tried some examples (blinky, shell ...), and there is nothing happening. No LED, no output message.

    Here is an extract of the BL652 datasheet about the available oscillators :

    The integrated high accuracy 32 MHz (±10 ppm) crystal oscillator helps with radio operation and reducing power consumption in the active modes. The integrated on-chip 32.768 kHz RC oscillator (±250 ppm) provides protocol timing and helps with radio power consumption in the system StandByDoze and Deep Sleep modes by reducing the time that the RX window needs to be open. To keep the on-chip 32.768 kHz RC oscillator within ±250 ppm (which is needed to run the BLE stack) accuracy, RC oscillator needs to be calibrated (which takes 16-17 mS) regularly. The default calibration interval is eight seconds which is enough to keep within ±250 ppm. The calibration interval ranges from 0.25 seconds to 31.75 seconds (in multiples of 0.25 seconds) and configurable via smartBASIC command at+cfg210.

    Best regards

  • Try adding the two lines below to the file [ZEPHYR_ROOT]/boards/arm/nrf52_pca10040/nrf52_pca10040_defconfig:

    CONFIG_CLOCK_CONTROL_NRF5_K32SRC_RC=y
    CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM=y
    
  • Perfect! The LED is blinking !

    Thanks a lot. How did you come to the solution?

  • I found the config parameters in the defconfig file for the BBC micro:bit board, which also have no external low frequency crystal oscillator.

Related