Commit graph

8 commits

Author SHA1 Message Date
Philippe Teuwen
26eb54b965 style 2019-04-06 01:00:54 +02:00
Philippe Teuwen
1b2601a48a Add missing EOF LF 2019-03-12 00:12:26 +01:00
Chris
5f77121694 initial commit to be in sync the-soon-defunct repo pm3rdv40. 2018-08-12 21:54:31 +02:00
Andreas Dröscher
9d330dde87 fix: 32bit tick timer based on TC0 and TC1
TC1 counts the number of TC0 overflows (carry bits).
In random conditions TC1 would return or stay at zero,
instead of counting up. This due to the behavior of the
reset signal.

SAM7S Series Datasheet, 33.5.6 Trigger:
Regardless of the trigger used, it will be taken into account
at the following active edge of the selected clock. This means
that the counter value can be read differently from zero just
after a trigger, especially when a low frequency signal is
selected as the clock.

The new code first prepares TC1 and asserts TC1 trigger and
then prepares TC0 and asserts TC0 trigger. The TC0 start-up
will reset TC1.
2018-08-12 12:41:11 +02:00
iceman1001
d41efbf21b ADD: added a StopTicks functions, to disable the timer used for ticks (TC0, TC1) 2016-10-07 00:13:09 +02:00
iceman1001
c649c43389 CHG: finally, the ticks timer does what it is supposed to do. 32bits and working. 2016-09-29 21:36:43 +02:00
iceman1001
fabef615ec CHG: added addresize to legic select struct.
CHG: TIMER, it turns out the TC0, TC1 and TC2 is only 16bit.  So adjust to use two clocks to get a 32bit timer.
CHG: code clean up in legic device side.  consistency with variable names..
2016-09-29 17:43:39 +02:00
iceman1001
22f4dca88c CHG: extracted some timers functionality, to get unified access to a timer/clock which counts in ticks. Moved stuff from util.c 2016-09-21 19:03:32 +02:00