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

nRF51 RF channel center frequency in BLE mode

Hello,

I developed a firmware on nrf51422 with nrf51. I use a development board PCA10028. With this firmware I control the directly the radio registers (Soft Device is disabled). My code is inspired from "radio test" available in SDK 10.0 (nRF51_SDK_10.0.0_dc26b5e\examples\peripheral\radio_test).

I'm in RADIO_MODE_MODE_Ble_1Mbit mode.

I call radio_tx_carrier(radio_x_power, radio_x_mode, radio_x_channel);

The radio_tx_carrier() code from nRF51_SDK_10.0.0_dc26b5e\examples\peripheral\radio_test\radio_test.c

With RF analyser I have this results:

channel 1 mesure: 2.41140, channel 2 mesure: 2.41248, channel 3 mesure: 2.41340, channel 4 mesure: 2.41443, channel 5 mesure: 2.41548,
channel 6 mesure: 2.41647, channel 7 mesure: 2.41735, channel 8 mesure: 2.41838, channel 9 mesure: 2.41957, channel 10 mesure: 2.42053,

Channel center frequency is shifted.

How I can set correctly the center frequency? I read that there was a register FICR:BLE_1MBIT[n]. Where is the description of the value that I can write? Frequency offset? unit? ...

Thanks for your help.

Regards.

phlb

Parents
  • The radio override register does not apply here, as it will have an effect on the deviation, not the center frequency. The radio_test example should already do what you describe, but what you might have overlooked is:

    static void init(void)
    {
        NRF_RNG->TASKS_START = 1;
        
        // Start 16 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.
        }  
    }
    
Reply
  • The radio override register does not apply here, as it will have an effect on the deviation, not the center frequency. The radio_test example should already do what you describe, but what you might have overlooked is:

    static void init(void)
    {
        NRF_RNG->TASKS_START = 1;
        
        // Start 16 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.
        }  
    }
    
Children
No Data
Related