Skip to content

Timer Jitter when 5v not applied to VBUS #37047

Answered by dlktdr
dlktdr asked this question in General
Discussion options

You must be logged in to vote

Nevermind found it..

When VBUS is at +5v it also always enables the accurate HF clock source. I set it to always HF and works like I was hoping!

    // Force High Accuracy Clock
    const char *clock_label = DT_LABEL(CLOCK_NODE);
	clock0 = device_get_binding(clock_label);
	if (clock0 == NULL) {
		printk("Failed to fetch clock %s\n", clock_label);
	}
    clock_control_on(clock0,CLOCK_CONTROL_NRF_SUBSYS_HF);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dlktdr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant