HW TIMER divider outside of [2, 65536] range error

akashdeepsingh
Posts: 9
Joined: Thu Feb 28, 2019 8:28 pm

HW TIMER divider outside of [2, 65536] range error

Postby akashdeepsingh » Tue Mar 05, 2019 3:02 am

I am trying to create a timer to get value in nano seconds. For this, I am using the "timer_group" example where I set the "TIMER_DIVIDER" to 1 in order to get 12.5 ns per tick. However, I get the following error:

Code: Select all

timer_group: timer_init(214): HW TIMER divider outside of [2, 65536] range error
Does this mean that the max freq. of clock that we can get for our timer group is 40 MHz? or am I doing something wrong?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: HW TIMER divider outside of [2, 65536] range error

Postby WiFive » Tue Mar 05, 2019 3:33 am

Specifically, when TIMGn_Tx_DIVIDER is either 1 or 2, the clock divisor is 2; when TIMGn_Tx_DIVIDER is 0, the clock divisor is 65536. Any other value will cause the clock to be divided by exactly that value.

Who is online

Users browsing this forum: Google [Bot] and 146 guests