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

Why is the HFCLK necessary for the DTM module?

I'm implementing my own DTM mode for the nRF52832 based on SDK14.2's DTM module (ble_dtm.c). My modified version of ble_dtm.c seems to work fine, but I don't completely understand how it works. Specifically, I don't understand why the HFCLK needs to be activated in timer_init() in ble_dtm.c. I'm just going for a constant-carrier wave, so there is no need to use the Timer events to send packets. Without the HFCLK enable, I see no radio signal on my spectrum analyzer.

Parents
  • Hi,

    You can see from the implementation in ble_dtm.c that the timer is used to transmit packets with the correct delay between each packet (line 881-889 in ble_dtm.c in SDK 15.0.0).

    Update: I forgot the most obvious reason for requiring the HFCLK in my original answer, which is that requesting the HFCLK causes the crystal oscillator (HFXC) to run, which is required in order to get an accurate clock for using the radio. The HFINT oscillator is way too inaccurate for using the radio (worst case ±6 %). The SoftDevice normally starts the HFXC before it uses the radio, but as the DTM example handles the radio directly, it must also make sure to enable the clock.

Reply
  • Hi,

    You can see from the implementation in ble_dtm.c that the timer is used to transmit packets with the correct delay between each packet (line 881-889 in ble_dtm.c in SDK 15.0.0).

    Update: I forgot the most obvious reason for requiring the HFCLK in my original answer, which is that requesting the HFCLK causes the crystal oscillator (HFXC) to run, which is required in order to get an accurate clock for using the radio. The HFINT oscillator is way too inaccurate for using the radio (worst case ±6 %). The SoftDevice normally starts the HFXC before it uses the radio, but as the DTM example handles the radio directly, it must also make sure to enable the clock.

Children
Related