Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Attempt to document clocks and timers #438

Merged
merged 1 commit into from
Oct 21, 2019
Merged

WIP Attempt to document clocks and timers #438

merged 1 commit into from
Oct 21, 2019

Conversation

doegox
Copy link
Contributor

@doegox doegox commented Oct 15, 2019

Feel free to comment / fix / complete.
I wrote what I understood so far.
Still I don't understand why we have both Ticks and CountUS set of functions using the same timers for what looks like similar purposes

@iceman1001 iceman1001 added help wanted Extra attention is needed Information Figured something out and want to share it with community labels Oct 16, 2019
@iceman1001
Copy link
Collaborator

Great work compiling it to a document. Long overdue. In my newbie years I got bitten by these clock functions several times. Never made sence but I tried to sort things out one by one, with more comment in the code to document pitfalls like WDT...
Anyway, having fewer clocks based on T0/T1/T2 would be nice. With delta time. And with clear comments saying which functions can't be used together. And highest precision.

It is very popular among the code, like you seen in legic, or pcf5731, or hitag2-s, etc to just take a timer (T) configure it and run their code. Which is fine if you clean up afterwards and reset timer settings. This is one reason for the device to become unresponsive. We tried to clean up most of this but more cleaning is needed as you see.

The precision is very critical in most of our operations on the device side.
The 21.3 us tick was an eyeopener once upon a time. Never understood why the pwm pulse was off until ...

Getting all clocks in order and with a precise purpose of the clocks we keep is a must. This is one of our more important changes as I see it.

@iceman1001
Copy link
Collaborator

the clock that counts to 0xC000 was used on one of those hitag/ti/pcf5731 styled commands.
To be one timeperiod. We don't use that style of code any longer but the clock lives on

@iceman1001
Copy link
Collaborator

We might just merge this one and update the doc as we do things

@doegox
Copy link
Contributor Author

doegox commented Oct 21, 2019

ok I just didn't want to push wrong info but if you didn't detect probs so far yeah we can merge

@doegox doegox merged commit f76814c into master Oct 21, 2019
@doegox doegox deleted the clockdoc branch October 21, 2019 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed Information Figured something out and want to share it with community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants