Commit graph

226 commits

Author SHA1 Message Date
adamdunkels 465125c5e7 Added support for 32-bit clock ticks: when reading the 32-bit value, make sure that it does not change between readouts to avoid reading right in the middle of it being updated 2010-02-23 18:41:20 +00:00
adamdunkels 953a8c2015 Turn off timer before updating - needed to avoid bugs in ContikiMAC - not 100% sure why 2010-02-18 22:15:54 +00:00
adamdunkels 4ff6b5460a Removed safeguards around the update code for the timer; turns out they weren't needed (but instead triggered a bug in MSPsim) 2010-01-30 14:03:35 +00:00
adamdunkels dbacf3e781 Values altered in interrupt handlers should be volatile 2010-01-26 10:20:16 +00:00
adamdunkels 5a03e4e6ad Bugfix: changed #ifdef to #if, otherwise the SFD code would be enabled anyway 2010-01-19 20:35:41 +00:00
adamdunkels 9d751da8e5 Disable SFD interrupt by default 2010-01-19 13:11:23 +00:00
adamdunkels acea0afb35 Enable a flag when packet SFD seen 2010-01-19 13:11:01 +00:00
adamdunkels 2772d31ae6 Turn off Timer A before modifying its control registers to avoid problems when timer is updated frequently 2010-01-18 21:17:11 +00:00
nifi a364213180 IRQ_PORTx is no longer used. Instead returning port number. 2010-01-14 20:05:58 +00:00
nifi a937f8626c removed files no longer used with new sensor APIs 2010-01-14 18:10:31 +00:00
adamdunkels 9ac4109bad Increased the clock speed to 32768/4 from 32768/8 to provide better accuracy for power profiling of radio CCA checks 2009-12-09 12:55:35 +00:00
adamdunkels f9260c4fae Enable interrupts during the periodic clock processing to allow rtimers to execute on top of the clock 2009-12-08 23:40:14 +00:00
adamdunkels a4df6e0fbf Remove the read from TAIV - this should not be done for TIMERA0 interrupts (in fact, doing so messes up the other timer a interrupts, like the clock tick...) 2009-12-08 23:39:45 +00:00
adamdunkels 873f4d0222 Need to clear the interrupt flag register for Timer A 2009-12-07 14:32:16 +00:00
adamdunkels e3fed27f4a Broke out the CC2420 SFD interrupt into a separate file to allow easier overloading with project-specific files 2009-12-05 19:42:56 +00:00
nifi efdbbf9fe3 minor cleanup: random.c is already included in Makefile.include 2009-11-19 17:33:05 +00:00
nifi 4f2318152e Added support for CPU speed 2.4576MHz and configuration to enable/disable interrupt driven TX 2009-11-18 15:45:32 +00:00
nifi 2640f9bf26 Must check error flag before reading. Removed leds debug. 2009-11-18 13:24:12 +00:00
adamdunkels 790f2f632a Moved putchar into separate file to make it easier to override its implementation 2009-10-30 15:06:26 +00:00
fros4943 53d03aa924 uart correction values for 3.9Mhz (default sky freq.) 2009-10-27 16:25:28 +00:00
fros4943 b0291ca5a8 bug fix: wake up MSP430 when leaving rtimer interrupt if the rtimer polled a process.
thanks to Marco Vedovati for finding the bug
2009-10-06 09:21:46 +00:00
nifi c6f7ef84fe Initialize the transmit ringbuffer before enabling TX interrupt 2009-09-08 10:39:49 +00:00
adamdunkels 18486d4e3d Patch by Gideon Ernst: use explicit $(CONTIKI) path instead of implicit ../../ path to the mknmlist script 2009-09-03 17:41:58 +00:00
nvt-se 172ffb74c7 fix compiler warnings. patch from Jesper Karlsson. 2009-04-08 14:56:00 +00:00
nifi c1d490b6a7 added workaround for memcpy/memset bug in mspgcc 2009-04-06 13:07:37 +00:00
joxe 4f41b30b2b fixed variable names 2009-04-02 22:39:29 +00:00
joxe 7d2a08b29c added initial set-up code SFD capture interrupts usable for exact packet timestamping 2009-04-02 22:23:06 +00:00
adamdunkels 0076bfe8a5 Changed the name of the 'serial' module to 'serial-line' to signify that the module is about lines of data from the serial port, not individual bytes, and to make sdcc happy 2009-03-17 15:56:32 +00:00
adamdunkels 62ef4002a5 Always prod the watchdog on output to avoid spurious resets during long serial outputs 2009-03-02 22:01:26 +00:00
adamdunkels 6ab7ac0598 Added optional interrupt-based transmission, based on the ringbuf library 2009-03-01 20:40:30 +00:00
adamdunkels e34e97cd6f Minor code style fixes 2009-02-24 21:30:20 +00:00
nvt-se bff9841fbf Removed obsolete definitions. 2009-02-20 23:16:08 +00:00
joxe 80848e4106 added DCO-resync function and default config 2009-02-04 18:28:44 +00:00
joxe 5a8dc2df28 added handling function for checkin if uart is transmitting or receiving - patch by Klaus Stengel 2009-01-31 12:46:57 +00:00
nifi 9bf0dff605 Compile using . instead of separate make rules for .firmware 2008-12-16 13:54:25 +00:00
joxe 23b7db88d5 moved rtimer from TimerB to TimerA so that TimerB subsystem is free for other uses 2008-12-02 12:44:48 +00:00
nifi 2013c4fece Simulator for MSP430-based platforms 2008-11-24 11:09:36 +00:00
fros4943 1fbcfde0d6 implemented support for data argument when starting threads:
given function is called from a wrapper instead of immediately returned to via the stack
2008-11-21 10:28:32 +00:00
nifi 49f57b7848 changed to use unsigned long for seconds counter 2008-10-10 12:36:58 +00:00
joxe 8748230ead changed usart code to handle LPM3 2008-09-18 17:59:27 +00:00
fros4943 b90075ea0a bug fix, msp430 hw bug (undocumented):
when in continuous/compare mode the interrupt handler may get called before CCR==TR.

behavior observed when the timer is toggled between STOP/CONT in an external interrupt handler (serial input).

possibly this problem may also affect watchdog timer/timer B
2008-09-16 12:00:48 +00:00
fros4943 3ec170cdf5 added empty mtarch_stop() 2008-08-27 13:10:29 +00:00
adamdunkels fc6d059d24 Added a clock_seconds() function prototype to core/sys/clock.h, that returns seconds in 32 bit format. On platforms like the MSP430, which has a 16 bit native datatype, this cannot be implemented with an interrupt tick that increments a 32 bit value because access is not atomic. Instead, the MSP430 code increments 16 bit seconds value and converts this into a 32 bit value through an offset calculation. If the new value is smaller than the last check, the offset is incremented by 65536. This change also means that CLOCK_CONF_SECOND must be a power of two because a modulo operation is used inside the periodic tick interrupt handler. 2008-07-07 23:38:09 +00:00
adamdunkels 62b7ef5173 Moved energest from lib/ to sys/ 2008-07-04 00:02:21 +00:00
adamdunkels 64b6663b11 moved energest from lib/ to sys/ 2008-07-03 23:59:20 +00:00
adamdunkels 7c459c849d The .ihex file use the intermediate Contiki-wide .$(TARGET) target instead of the MSP430-specific .firmware 2008-07-02 14:11:34 +00:00
adamdunkels 66876625d4 Changed name of the simple-cc2420 module to cc2420: changed all function names and variable names from simple_cc2420_* to cc2420_*. 2008-07-02 09:05:40 +00:00
adamdunkels 1586d8f36f Changed filename of the CC2420 driver from simple-cc2420 to cc2420. 2008-07-01 21:02:51 +00:00
adamdunkels 2569a8fc69 Removed unused file 2008-07-01 20:59:44 +00:00
joxe 57dedee38f enabled ADC IRQs if ADC sensors active 2008-04-25 15:53:55 +00:00
adamdunkels da49b950d4 Count the number of times the watchdog has been stopped to avoid starting it when someone else has stopped it 2008-02-11 10:45:19 +00:00
adamdunkels 660b7f9a78 Initialize watchdog instead of stopping and starting it 2008-02-11 10:44:49 +00:00
adamdunkels cf5ff2bbb2 Made SLIP code coexist with ordinary serial code. If WITH_UIP=1, the SLIP code is used instead. 2008-02-03 20:59:35 +00:00
adamdunkels e68d669265 Added improvements suggested by Hardy Greich: define CPU speed in one place only (contiki-conf.h), added nop to XTAL settlement delay 2008-02-03 20:58:11 +00:00
adamdunkels a4d5ca833c Update the periodic watchdog only if it is not stopped 2008-01-21 10:39:23 +00:00
adamdunkels e16b7ffcf0 Changed the return value of the inpt handler function to int so that it can wake up the CPU from LPM 2008-01-08 08:04:09 +00:00
adamdunkels 7f05b8a5ef Added a reboot function 2008-01-08 08:03:02 +00:00
adamdunkels b50d2b02ee Reformatting to comply with code style 2008-01-08 08:01:41 +00:00
adamdunkels 345d0a8a79 Added a WERROR definition that can be used to turn -Werror on 2008-01-08 08:01:01 +00:00
adamdunkels 6e0e6e1279 Removed -Werror since LPM*_EXIT; and friends trigger an internal mspgcc compiler error 2007-11-26 23:23:20 +00:00
joxe a4985fd1f7 removed offset in rtimer_arch 2007-11-19 22:38:57 +00:00
adamdunkels 2132462716 Updated to use the watchdog API 2007-11-17 10:28:04 +00:00
adamdunkels 19b7bd9217 Fixed watchdog support for the MSP430. It now works as intended 2007-11-17 10:16:48 +00:00
adamdunkels 22cb35e9f6 Added -Werror to turn compiler warnings into errors to ensure that code always compile without warnings 2007-11-17 10:11:58 +00:00
adamdunkels f192211444 Added a hack function called clock_counter() to make the current prototype profiling code run on the MSP430 platform 2007-11-12 21:07:39 +00:00
adamdunkels 585f00a804 Removed old codeprop-tmp.c 2007-11-06 20:35:42 +00:00
joxe 7fe87db86a fixed some timer interrupt bugs and reimplemented clock_fine to avoid disabling interrupts 2007-10-04 20:45:29 +00:00
fros4943 5f63995265 support for delayed interrupts
earlier TACCR1 could be set to already passed time if timer A interrupts was delayed
2007-10-04 14:14:58 +00:00
nvt-se 1d4db3e2cc The function was missing the case when the stack was used completely,
and didn't return a value then.
2007-09-14 20:21:01 +00:00
nvt-se b4f3ab5af7 Added support for configurable callbacks of uart1 input. 2007-09-06 11:45:08 +00:00
joxe aaae9f4cf8 removed redundant code - configuration of basic clock subsystem in clock and rtimer_arch 2007-09-03 19:22:37 +00:00
bg- dcafdfe51a * Standard defines for MSP430. 2007-08-16 13:09:06 +00:00
adamdunkels 2c53a38075 Architecture dependent code for the CC2420 driver 2007-05-25 08:07:54 +00:00
adamdunkels 00b1e371cf Added energy estimation, disabled IRQs for A/D converting as it used close to 100% CPU time 2007-05-22 21:01:32 +00:00
adamdunkels 3872d004bc Reading timer now quicker, embryo for possible future drift configuration 2007-05-22 21:00:09 +00:00
adamdunkels 432d242a3c Added energy estimation, embryo for possible future drift configuration 2007-05-22 20:59:47 +00:00
adamdunkels 9a5bac6282 Added energy estimation 2007-05-22 20:59:11 +00:00
bg- 3f4ec3cf44 * Use _end rather than nonstandard __bss_end. 2007-05-21 15:29:46 +00:00
oliverschmidt ae2073cac9 Factored out setup directory search path for source files into Makefile.include.
- All compilers used support the -I option for setting an include search directory.

- The Contiki source tree follows the (common) approach of placing declarations (in headerf iles) in the same directory as definitions (in source files).

As a result it makes sense to use the -I compiler option for just the same set of directories used for the vpath gnumake directive.

Note: I checked several builds but nevertheless one or the other might need some additional adjustsments. Sorry for the inconvenience.
2007-05-19 07:54:53 +00:00
adamdunkels 4364a9929a Removed WITH_UIP 2007-05-15 08:09:45 +00:00
oliverschmidt 237b1617b5 Factored out setup directory search path for source files into Makefile.include.
- Search target specific directories before CPU specific directories.
- Search CPU specific directories before generic directories.

Note: I checked several builds but nevertheless one or the other might need some additional adjustsments. Sorry for the inconvenience.
2007-05-13 08:41:11 +00:00
adamdunkels b2b750e83b rtimer_arch_now() now returns the correct value 2007-04-07 05:45:08 +00:00
bg- 8aa34f1ea4 * remove author. 2007-04-04 11:53:07 +00:00
adamdunkels 08d825c450 Added rtimer-arch.c 2007-04-03 19:05:13 +00:00
adamdunkels b108ca702a Fixed description 2007-04-03 19:04:27 +00:00
adamdunkels 00645113e5 MSP430 real-time rtimer support using timerb1 2007-04-03 19:03:09 +00:00
joxe 8add3d4660 corrected comments 2007-04-02 16:32:20 +00:00
adamdunkels 92e5e7a13c Removed clock_delay() 2007-03-29 23:43:59 +00:00
adamdunkels d2683224e9 Added clock_delay() between characters to avoid dropping them 2007-03-25 21:52:41 +00:00
adamdunkels 6a8d8e3abf Added experimental clock_fine() function 2007-03-25 21:51:31 +00:00
nifi f0ce3a5292 Moved buildscripts from cpu/msp430 to platform/esb. 2007-03-23 16:19:41 +00:00
adamdunkels 199e0cb30d Added NM definition 2007-03-22 23:57:33 +00:00
adamdunkels 011306ce54 LPM4_EXIT instead of LPM_AWAKE() 2007-03-21 23:23:43 +00:00
adamdunkels 5a5313aa80 Added uip include and asmv definition to make it compile 2007-03-15 21:51:12 +00:00
adamdunkels 8f9aa7b2f7 Moved uip_ipchksum() into a separate file to allow the Tmote Sky port to be compiled entirely without uIP 2007-03-15 21:47:45 +00:00
adamdunkels b7107c0eea Added uart1.c and the dev/ subdirectory 2007-03-15 21:46:43 +00:00
adamdunkels 329bb14d94 +copyright header 2007-03-15 21:39:23 +00:00
adamdunkels 36c17d22d0 uIP checksum calculation for MSP430 2007-03-15 21:38:46 +00:00
adamdunkels c1df2e6df8 MSP430 definitions 2007-03-15 21:38:22 +00:00
adamdunkels 1fbc0aa5b7 UART1 driver 2007-03-15 21:37:19 +00:00
adamdunkels 574becc10e Interrupt arbitration for sensor drivers 2007-03-15 21:37:01 +00:00
bg- 429d41defd * General stuff for different baudrates:
- ubr argument to slip_arch_int

    - macros for calculating ubr

    - argument -Bbaudrate to tools tunslip and scat
2007-02-02 13:26:48 +00:00
bg- 394992b99f * Workaround for bug in msp430-ld where __bss_end is sometimes
misaligned.

* Indent trailing brace properly.
2007-01-30 20:01:45 +00:00
adamdunkels 83b348631f Changed the generation of symbols to the mknmlist script. Now symbols.h is not automatically generated so we can use it as a normal include file and remove symbols-def.h. 2007-01-24 16:11:48 +00:00
adamdunkels bdb317274e Added generation of symbols.[ch], removed cfs-eeprom (should be in platform makefile instead) 2006-12-19 09:22:25 +00:00
fros4943 93714fc39f updated reference to "elfloader-tmp" 2006-12-18 15:17:47 +00:00
adamdunkels 5d3baef0d2 Removed old elfloader.c and replaced with the current code (previously in elfloader-tmp.c) 2006-12-18 11:45:47 +00:00
bg- 290489ac10 * Bump speed over serial to 115200 (Tmote sky only). 2006-12-01 15:07:49 +00:00
bg- e9b0d2fe7c * Remove printfs. 2006-12-01 15:06:42 +00:00
bg- a8c35677bd * Obob in cur_break initialisation. 2006-11-17 13:30:45 +00:00
joxe 6c59ef668f added SELECT_IO and SELECT_PM macros 2006-10-10 21:33:26 +00:00
adamdunkels b04edbebb3 CFLAGS contain nodeid if it is defined 2006-10-09 09:15:48 +00:00
adamdunkels bf5b90d764 Removed generation of node-id.c file since node ID now is stored in EEPROM 2006-10-09 09:13:23 +00:00
joxe e49539eea9 removed old node id management from makefile 2006-10-09 09:12:46 +00:00
bg- 752fa92657 Minimalistic plug in replacement for the leds package. 2006-09-27 09:32:08 +00:00
adamdunkels e072e4084a Added a function for measuring stack usage 2006-09-26 20:56:42 +00:00
adamdunkels 80a7d1fba2 Added mtarch.c 2006-09-01 22:56:26 +00:00
adamdunkels 2ab93b730f Fixed include path 2006-09-01 22:56:18 +00:00
bg- 157ee59ff5 Obob bug spotted by nfi. 2006-08-25 09:40:21 +00:00
bg- 20bac141ca Use LPM4_EXIT to return from sleep on msp430. 2006-08-17 15:41:13 +00:00
bg- b065b27759 * Deal with numerical overflows. 2006-08-17 15:25:46 +00:00
bg- 0bf3db5df7 Make malloc machine independent by relying on dependent sbrk(2). 2006-08-11 13:41:31 +00:00
adamdunkels 8ee4f7fc3d Removed out-commented stuff from Makefiles 2006-06-24 06:23:47 +00:00
nifi c649818fe5 fix to allow projects to extend the linker flags 2006-06-22 14:24:49 +00:00
nifi 05f6bb5feb Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-22 14:22:42 +00:00
adamdunkels c9e808d638 Import of the contiki-2.x development code from the SICS internal CVS server 2006-06-17 22:41:10 +00:00