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

HFCLK to Radio Ramp up

Hi,

I'm evaluating the nRF52840 using the DK. I find that the hfxtal in the 52840DK is GSX-223, which is not included in the data sheets characterization of HFXTAL ramp-up time.

My question is, I'm having problem when enabling the HFXTAL then going directly ramping up the radio.

// Enable the HFCLK
NRF_CLOCK->EVENTS_HFCLKSTARTED          = 0;
NRF_CLOCK->TASKS_HFCLKSTART             = 0x00000001;
while(NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    
// Enable the Radio
NRF_RADIO->EVENTS_READY            = 0;
NRF_RADIO->TASKS_TXEN              = 1;
while (NRF_RADIO->EVENTS_READY == 0);

as of the moment, what i'm doing is arm the RTC clock to fire 250us before enabling the HFCLK. I read somewhere that the BLE softdevice disables the HFCLK whenever the radio is not needed. I'm basically doing the same thing. Am I missing something?

Parents
  • Hi,

    I already solve the problem.

    In the application I'm working, the HFCLK is disabled and only enabled when the radio is needed. The problem I'm seeing is enabling the HFCLK then turning on the radio would cause the radio not transmit anything. Because of this, I thought that when the HFCLKSTARTED event is triggered, the HFXO is still starting up so when I immediately enable the radio and start transmitting, its not transmitting anything. 

    Although from the spec sheet it seems like after the HFXO startup, I still need to wait a couple of us because of the HFXO debounce time. My guess is the HFXO debounce given by HFXODEBOUNCE is the debounce time to switch from HFINT to HFXO. to solve this, what I simply did is use time and flag an interrupt after 256us or wait until HFCLKSTAT[STATE] to be '1'.

Reply
  • Hi,

    I already solve the problem.

    In the application I'm working, the HFCLK is disabled and only enabled when the radio is needed. The problem I'm seeing is enabling the HFCLK then turning on the radio would cause the radio not transmit anything. Because of this, I thought that when the HFCLKSTARTED event is triggered, the HFXO is still starting up so when I immediately enable the radio and start transmitting, its not transmitting anything. 

    Although from the spec sheet it seems like after the HFXO startup, I still need to wait a couple of us because of the HFXO debounce time. My guess is the HFXO debounce given by HFXODEBOUNCE is the debounce time to switch from HFINT to HFXO. to solve this, what I simply did is use time and flag an interrupt after 256us or wait until HFCLKSTAT[STATE] to be '1'.

Children
No Data
Related