The official git repository for OSD-Contiki, the open source OS for the Internet of Things
705587cdb7
The problem with the current version of the code was that the condition at the end of the do...while loop at Timer A1 interrupt: while((TACCR1 - TAR) > INTERVAL); evaluates to false whenever TACCR1 == TAR. Not incrementing TACCR1 in this case leads to Timer A1 interrupt not being called for 2 seconds, until TAR counter reaches TACCR1 again after an overflow. The patch avoids this problem by changing the condition of the loop, and using CLOCK_LT macro to compare between time values. The patch also attempts to fix another problem: a read of TAR register while it is being updated may return a lower value than the actual contents. To avoid that, the "read twice and compare results" idiom should be used. As the TAR register is updated by the actual hardware, it is of no importance whether it is read with interrupts disabled or enabled; the problem can occur in both contexts. |
||
---|---|---|
apps | ||
core | ||
cpu | ||
dev | ||
doc | ||
examples | ||
platform | ||
regression-tests | ||
tools | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
LICENSE | ||
Makefile.include | ||
README-BUILDING.md | ||
README-EXAMPLES.md | ||
README.md |
The Contiki Operating System
Contiki is an open source operating system that runs on tiny low-power microcontrollers and makes it possible to develop applications that make efficient use of the hardware while providing standardized low-power wireless communication for a range of hardware platforms.
Contiki is used in numerous commercial and non-commercial systems, such as city sound monitoring, street lights, networked electrical power meters, industrial monitoring, radiation monitoring, construction site monitoring, alarm systems, remote house monitoring, and so on.
For more information, see the Contiki website: