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

the clock function is not working in esb_ptx example for nRF52832

Hi, 

as I said before I am working with nRF52832. I can connect with nrf and program it. for example I can make an LED to blink. but when I run the esb_ptx example the program doesn't pass through the clock_initialize() line. I am using the CX2016DB32000D0WZRC1 chip as the crystal. can you help me to find the problem.   

Parents
  • Hi,

    but when I run the esb_ptx example the program doesn't pass through the clock_initialize() line.

    There is no function called clock_initialize in the SDK 17 (which I see you are using in another question). There is a clocks_start() in the esb_ptx example, though. Is that the one?

    That is implemented like this:

    void clocks_start( void )
    {
        NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
        NRF_CLOCK->TASKS_HFCLKSTART = 1;
    
        while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);
    }

    So the only thing that could make this not return is if the HFCLKSTARTED event never happens. Can you double check with a debugger if this really is the problem, and the while loop never exits? If so, there is likely a problem with the HF crystal on your HW.

  • you are right, it is clock_start(). when I comment clock_start() the program runs properly and the LED start blinking, but when the clock_start() line is active, it stops there. I checked the crystal an I even changed it but noting happen. the crystal that i am using has all the features that is said in datasheet. 

Reply Children
Related