The official git repository for OSD-Contiki, the open source OS for the Internet of Things
Find a file
Atis Elsts 705587cdb7 Fix time accounting on msp430 Series 1 and Series 2 MCU based platforms.
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.
2014-07-02 11:07:02 +02:00
apps Removed references to missing DTLS implementation. 2014-05-15 20:29:05 +02:00
core Improve RPL hop-by-hop option detection 2014-06-27 09:45:57 +02:00
cpu Fix time accounting on msp430 Series 1 and Series 2 MCU based platforms. 2014-07-02 11:07:02 +02:00
dev Fixed CC2420 to return RADIO_RESULT_INVALID_VALUE if trying to set a 2014-04-13 21:43:37 +02:00
doc Bumped the version number from 2.6 to 3.x, which is to be used in the development branch 2013-12-12 17:33:18 +01:00
examples Merge pull request #718 from g-oikonomou/rpl-dodagid-compliance 2014-06-13 15:33:56 +02:00
platform rl78: Change RIMEADDR_CONF_SIZE to LINKADDR_CONF_SIZE because the rimeaddr module has been renamed to linkaddr. 2014-06-28 22:07:57 -04:00
regression-tests Merge pull request #620 from adamdunkels/push/socket-api 2014-04-09 22:12:59 +02:00
tools Merge pull request #511 from ADVANSEE/leds 2014-06-11 22:37:34 +02:00
.gitignore Adding tunslip to gitignore 2014-06-06 15:05:11 +02:00
.gitmodules Added the cc2538-bsl submodule to the tools dir 2014-03-07 15:44:29 +01:00
.travis.yml Download the RL 78 toolchain from a different URL 2014-06-12 09:10:26 +01:00
LICENSE Removed the explicit year 2012 to make it more generic 2012-10-25 23:08:54 +02:00
Makefile.include Merge pull request #613 from nfi/distclean 2014-06-11 23:16:36 +02:00
README-BUILDING.md Rename to md 2013-03-26 23:15:37 +01:00
README-EXAMPLES.md Several minor consistency improvements. 2013-07-31 00:55:31 +02:00
README.md Rename to md 2013-03-26 23:15:37 +01:00

The Contiki Operating System

Build Status

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:

http://contiki-os.org