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

If EVENTS_HFCLKSTARTED never triggers is the problem definitely pcb related?

Hello All,

We have a custom board with nRF52840 and I believe, we have problem with the HFCLK.

We are trying to test our board with the ble_app_blinky example and it works fine with our nRF52840 Preview DK. Using the same example on our custom board, the ble_stack_init() function hangs and ble never initialized. When I put the below code at the start of my main function, the code just hangs in the while loop. I also read that the radio module on the chip requires the external HFCLK source and without it we cannot use BLE functionalities.

NRF_CLOCK->TASKS_HFCLKSTART = 1;
while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);

I've read many threads in this forum releated the HFCLK not starting issue and almost all of them was related to PCB soldering or some other PCB design problems. We are using the reference design shown below and our IC revision code is  nRF52840-QIAAC0. HF crystal orientation looks correct in our PCB but we haven't tested everything yet. So do you think our issue is related to the hardware(pcb)?

Thank you very much for your help in advance.

Parents
  • Yes it is most likely a crystal problem. Either it's soldered badly or the load capacitance is incorrect or the load caps are incorrectly soldered or you put the wrong load caps on  there is something else about the crystal which is out of spec. The only board I ever had which failed that simple test you have above, starting the HFCLK and waiting for it to start, had a crystal soldering issue. 

    If you want to post the exact make and model of the crystal someone can check it's a model which ought to work. 

  • Thanks for the answer RK.

    The crystal that is used on the board is this crystal.

    I noticed that the crystal used on the board is different than the crystal that was selected by the design team. It looks like pins are not compatible between the crystal that is used and the crystal that is selected by the design team. I would really appreciate if someone can verify if this two crystals are not compatible.

  • If you're correct about the crystal which has been mounted then .. it's not even a crystal, it's a crystal oscillator designed with the same form factor as a 2mm x 1.6mm crystal. That thing requires power into pin #4 which I'm 99.999% you've grounded as pins #2 and #4 are ground on a real 2x1.6 crystal. It would actually be possible to use a crystal oscillator such as this one as the nRF does accept a driven oscillator input, however you'd need a different circuit to apply power to it and you'd need different settings on the nRF to use it. 

    I don't know why anyone would replace the crystal you specified with an entirely incompatible device. But it's not going to work. 

  • Thank you very much for your help RK, I really appreciate your help. As you also noticed someone made a mistake during the production of our custom board and they put a crystal oscillator instead of a crystal.

    Update: Yes the issue was with the clock source. Once we replaced the old component with the coorect one everything worked as expected.

Reply
  • Thank you very much for your help RK, I really appreciate your help. As you also noticed someone made a mistake during the production of our custom board and they put a crystal oscillator instead of a crystal.

    Update: Yes the issue was with the clock source. Once we replaced the old component with the coorect one everything worked as expected.

Children
No Data
Related