will frc1_count be reset after frc1_load_value is write?

tobewinner
Posts: 45
Joined: Tue Jan 19, 2016 2:39 pm

will frc1_count be reset after frc1_load_value is write?

Postby tobewinner » Tue Apr 25, 2017 2:28 pm

in the timer interrupt , i need to reset timer interval.
to be more accurate, how to set the reg values?
if i rewrite the frc1_load_value, will the frc1_count be reset to frc1_load_value?

pratik

Re: will frc1_count be reset after frc1_load_value is write?

Postby pratik » Wed Apr 26, 2017 1:26 pm

Yes, you may write to the frc1_load to load a new value into the counter. The frc1_count is a read-only register.

tobewinner
Posts: 45
Joined: Tue Jan 19, 2016 2:39 pm

Re: will frc1_count be reset after frc1_load_value is write?

Postby tobewinner » Thu Apr 27, 2017 3:00 pm

Thanks.
That is, if the frc1_count reg is 123, and I write 300 to the frc1_load reg, then the frc1_count reg will be 300 right now?

pratik

Re: will frc1_count be reset after frc1_load_value is write?

Postby pratik » Sun Apr 30, 2017 1:17 pm

Yes, that should be it. But the time for executing the function will also matter, so use an IRAM_ATTR function to get best results (as they are usually called faster than an ICACHE function).

Who is online

Users browsing this forum: No registered users and 64 guests