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

NRF_CLOCK->EVENTS_LFCLKSTARTED loops forever

Hi I have problem with LFCLK timer. In os_tick_init() in RTX_Conf_CM.c there is a loop and it won't end.

while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0)
 {
 Do nothing.
 }

I tried _DSB() solution but it still won't work. If I comment this loop the program works fine, but I don't want some unpredictable things in the future. What can I do?

Parents
  • well why isn't it starting? Do you have a 32kHZ crystal on the board you're using?

  • well that's your problem then as the line above tries to start the LF clock with the crystal and you don't have one so it'll never start.

    I have no idea how RTX is still running, never looked at that port, perhaps the other LF clock is already started, the RC one, and that's enough, or it doesn't actually use an RTC or without RTC it sticks on one task and doesn't do anything.

    You wanted to know why it looped forever, that's why. If you don't have a crystal you might want to change the clock source so at least you have an LF clock running, can't think it would start one if it didn't need one.

Reply
  • well that's your problem then as the line above tries to start the LF clock with the crystal and you don't have one so it'll never start.

    I have no idea how RTX is still running, never looked at that port, perhaps the other LF clock is already started, the RC one, and that's enough, or it doesn't actually use an RTC or without RTC it sticks on one task and doesn't do anything.

    You wanted to know why it looped forever, that's why. If you don't have a crystal you might want to change the clock source so at least you have an LF clock running, can't think it would start one if it didn't need one.

Children
No Data
Related