Question about the dual timer 0 hard code?
MCU & Boards
No replies yet. Be the first to reply.
Join the discussion.
MCU & Boards
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: Question about the dual timer 0 hard code?
by Hooligan0 ·
The value into the load register depend of your application
Here, why 4FFFF … i don’t know, maybe it’s because your application need this specific time … or maybe because you have copy/paste from an example.
So, maybe the real question is : how to compute a “load” value ?
Each timer channel count down from a specified value (the load register) to 0. Higher is the value written into load register, longer is the time need to reach 0. So the value you put here, define the time from start to end (if one-shot) or the period (free-running).
In you code, you have set the timer as free running ; and you have set an interrupt handler. So you will get an interrupt each 4FFFF clock ticks.
The address of timer 1 is 0x40002000 (datasheet page 16 “memory map”) [1]
But, maybe you talk about the channel 1 of timer 0, in this case the address is 0x40001020 to 0x40001038 (see reference manual page 387) [2]
[1] wizwiki.net/wiki/lib/exe/fetch.p … 151028.pdf
[2] wizwiki.net/wiki/lib/exe/fetch.p … m_v102.pdf
RE: Question about the dual timer 0 hard code?
by Yake ·
The value into the load register depend of your application
Here, why 4FFFF … i don’t know, maybe it’s because your application need this specific time … or maybe because you have copy/paste from an example.
So, maybe the real question is : how to compute a “load” value ?
Each timer channel count down from a specified value (the load register) to 0. Higher is the value written into load register, longer is the time need to reach 0. So the value you put here, define the time from start to end (if one-shot) or the period (free-running).
In you code, you have set the timer as free running ; and you have set an interrupt handler. So you will get an interrupt each 4FFFF clock ticks.
The address of timer 1 is 0x40002000 (datasheet page 16 “memory map”) [1]
But, maybe you talk about the channel 1 of timer 0, in this case the address is 0x40001020 to 0x40001038 (see reference manual page 387) [2]
[1] wizwiki.net/wiki/lib/exe/fetch.p … 151028.pdf
[2] wizwiki.net/wiki/lib/exe/fetch.p … m_v102.pdf[/quote]
Thanks Hooligan0, I think there should be a method to compute timer value, for example, if I want to get a 1ms delay, what is the formula or the compute process, I will check other textbooks.Thanks!
RE: Question about the dual timer 0 hard code?
by lawrence WIZnet ·
Hello Yake and Hooligan0
Thank you for your interests with W7500!
I am so afraid to tell you this one…If you try to find it hard…
In the Dualtimer code, we do not define any value with Timerload.
Even 0x4FFF has no meaning… only meaning is it is someone’s init value.
So, any one can change the value as down counter to do what user wants.
Thank you again and please feel free to ask any questions or any wonders!
lawrence