Commit graph

1057 commits

Author SHA1 Message Date
Adam Dunkels dee654cfe5 Put the cc253x custom makerules in its own customrules file 2014-01-26 23:20:41 +01:00
Adam Dunkels 7846eb2e2f Split the cc2430 custom rules into its own file 2014-01-26 23:20:40 +01:00
Adam Dunkels 36a5aadc9e Moved the 6502 custom rules into its own Makefile.customrules-6502 file 2014-01-26 23:20:40 +01:00
Adam Dunkels 0fe08205e1 Moved the rimeaddr.[ch] code from the core/net/rime module to the core/net module, as it is used not only by rime code 2014-01-26 23:20:36 +01:00
Adam Dunkels c9efe3c3c4 Moved the cc2520 driver into its own dev/cc2520 module 2014-01-26 23:20:31 +01:00
Adam Dunkels 0b805e4763 Moved the cc2420 driver into a separate dev/cc2420 module 2014-01-26 23:20:27 +01:00
Adam Dunkels 5f3fe7f7c7 Updated include paths for the moved files under net/ 2014-01-26 23:20:23 +01:00
Oliver Schmidt 8baf2d7b42 Merge pull request #536 from oliverschmidt/master
Copied 'contiki_arg[c|v]' from 'native' to the other desktop targets.
2014-01-24 03:41:42 -08:00
Oliver Schmidt fc983e2e79 Copied 'contiki_arg[c|v]' from 'native' to the other desktop targets.
- On the retro targets support for 'contiki_arg[c|v]' is optional as accesing arg[c|v] is rather expensive.
2014-01-24 11:56:40 +01:00
Ian Martin 1b61f1bb7b Add cpu/rl78/dev/uart1.h because some examples rely on it. 2014-01-22 18:42:24 -05:00
Ian Martin a897426410 Increase the default baudrate to 38400 bps for RL78. 2014-01-22 18:42:18 -05:00
Ian Martin 00468a3f53 Fix buggy UART baudrate calculation in the RL78 UART driver. 2014-01-22 18:41:55 -05:00
Oliver Schmidt 510678bed0 Added mouse support for the Atari. 2014-01-20 22:51:40 +01:00
Oliver Schmidt a24865de72 Add somewhat more support to use different mouse drivers.
- The default mouse driver is now always named 'contiki.mou'.
- Alternative mouse drivers are present in the disk images.
- Users can select their mouse driver by renaming the files.
2014-01-17 23:45:59 +01:00
Oliver Schmidt fb20cf5ee6 Added UIP_CONF_LLH_LEN. 2014-01-17 22:07:03 +01:00
Ian Martin 7d3053bbc5 Remove hyphen from preprocessor symbol to fix compiler warning. 2014-01-10 16:31:05 -05:00
Ian Martin 174d4dd80c Adds support for ADF7023 sub-GHz radio from Analog Devices and RL78 series MCU from Renesas.
This example platform for this port is the EVAL-ADF7XXXMB4Z w/ radio
daughter cards:

    http://www.analog.com/en/evaluation/eval-adf7023/eb.html

See the platform readme for usage and platform information:

    https://github.com/contiki-os/contiki/tree/master/platform/eval-adf7xxxmb4z/readme.md

All files provided by Analog Devices for this port are released under
the same license as Contiki and copyright Analog Devices Inc. per
agreement between Redwire Consulting, LLC and Analog Devices Inc. (SOW 08122013)
2014-01-04 18:56:51 -05:00
Ian Martin e90af44ca7 Merge ADF7023 driver from https://github.com/analogdevicesinc/no-OS 2014-01-04 17:38:26 -05:00
Ian Martin 6d36c83513 Merge SPI driver from https://github.com/analogdevicesinc/no-OS 2014-01-04 17:38:26 -05:00
Ian Martin 6a88905f9d Merge UART driver from https://github.com/msalov/rl78-samples-R5F100SLAFB 2014-01-04 17:38:26 -05:00
Ian Martin d0abf415e7 Merge RL78 files from https://sourceware.org/git/?p=newlib.git 2014-01-04 17:38:26 -05:00
Dragos Bogdan cfd554dc24 Move files. 2014-01-04 17:27:52 -05:00
Dragos Bogdan 94d5d384e0 Move files. 2014-01-04 17:27:29 -05:00
Maxim Salov 2668b17f52 Move files. 2014-01-04 17:27:24 -05:00
DJ Delorie 5115554247 Move/rename files. 2014-01-04 17:27:23 -05:00
Oliver Schmidt 63725eff36 Merge remote-tracking branch 'upstream/master' 2013-12-12 20:46:43 +01:00
Oliver Schmidt 3b2173e01f Have CBM DOS filetype of imported files match the one used by cc65.
CFS_WRITE implies O_TRUNC which is implemented on CBM DOS by deleting an
exsisting file. Hoewever this succeeds only if the CBM DOS filetype matches.

We need a working O_TRUNC in order to be able to overwrite the contiki.cfg
configuration file.

Note: Now it has be clarified why overwriting the configuration file started to
fail the CBM PFS (platform file system) can be activated for the recently added
ethconfig program.
2013-12-12 18:57:40 +01:00
Benoît Thébaudeau 5261bb861d cc2538: lpm: Fix RTIMER_NOW() upon wake-up
When returning from PM1/2, the sleep timer value (used by RTIMER_NOW()) is not
up-to-date until a positive edge on the 32-kHz clock has been detected after the
system clock restarted. To ensure an updated value is read, wait for a positive
transition on the 32-kHz clock by polling the SYS_CTRL_CLOCK_STA.SYNC_32K bit,
before reading the sleep timer value.

Because of this RTIMER_NOW() fixup, lpm_exit() has to be called at the very
beginning of ISRs waking up the SoC. This also ensures that all clocks and
timers are enabled at the correct frequency and updated before using them
following wake-up.

Without this fix, etimers could sometimes (randomly, depending on timings)
become ultra slow (observed from 10x to 40x slower than normal) if the system
exited PM1/2 very often. This issue occurred more often with PM1.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 20:23:29 +01:00
Benoît Thébaudeau f149197aa8 cc2538: lpm: Speed up the transition to the 32-MHz XOSC after wake-up
As recommended by the CC2538 User's Guide, set SYS_CTRL_CLOCK_CTRL.OSC_PD to 0
before asserting WFI, and set it to 1 after the system clock is sourced from the
32-MHz XOSC following wake-up. This allows to automatically start both
oscillators upon wake-up in order to partially hide the 32-MHz XOSC startup time
by the 16-MHz RCOSC startup time.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 20:23:29 +01:00
Benoît Thébaudeau 13006e1c73 cc2538: lpm: Let system clock transitions complete before further changes
As a matter of precaution, always make sure that pending system clock
transitions are complete before requesting a new change of the system clock
source.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 20:23:29 +01:00
Benoît Thébaudeau 8514a91ea9 cc2538: lpm: Fix energest context when aborting lpm_enter()
In one of the abort cases in lpm_enter(), the energest context has previously
been set to LPM, so the abort code needs to set it back to CPU.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 20:23:29 +01:00
George Oikonomou f2c552bb55 Merge pull request #478 from ADVANSEE/cc2538-startup-cleanup
cc2538: Startup cleanup
2013-12-05 11:07:19 -08:00
George Oikonomou 17b2150081 Merge pull request #463 from ADVANSEE/cc2538-ports-pins
cc2538: Clean up and improve port and pin definitions
2013-12-05 10:31:29 -08:00
Benoît Thébaudeau a2686e581e cc2538: Add header file for flash CCA page and use it
Create a dedicated header file with all the definitions for the flash lock bit
page and customer configuration area. This avoids duplicating those definitions
in the startup-gcc.c files of all CC2538-based platforms, and this also allows
to easily manipulate the CCA from outside startup-gcc.c (e.g. for on-the-air
firmware update).

The definitions are now complete contrary to what was in startup-gcc.c:
 - Definitions have been added to select the bootloader backdoor pin and active
   level if enabled.
 - Definitions have been added to access the page and debug lock bits. The debug
   lock bit can be used to prevent someone from reading back a programmed
   firmware through JTAG if the firmware binary image has to be confidential,
   which should be combined with a disabled bootloader backdoor.
 - The application entry point is now tied to the beginning of the .text section
   instead of to the beginning of the flash. This allows projects using custom
   linker scripts to place the application entry point anywhere in the flash,
   which can be useful e.g. for on-the-air firmware update.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-12-05 18:45:51 +01:00
George Oikonomou 8b003c30c7 Merge pull request #471 from ADVANSEE/cc2538-gpio-power-up
cc2538: gpio: Add support for power up
2013-12-05 09:25:05 -08:00
George Oikonomou 97cdf39b95 Merge pull request #464 from ADVANSEE/cc2538-pm2-sram
cc2538: lpm: Give access to the SRAM non-retention area for PM2
2013-12-05 09:19:22 -08:00
Oliver Schmidt 9a48bcf941 Merge pull request #488 from oliverschmidt/master
Avoid access to the address register during auto-increment.
2013-12-03 12:59:45 -08:00
Oliver Schmidt 8386be428c Merge remote-tracking branch 'upstream/master' 2013-12-03 21:41:16 +01:00
Oliver Schmidt 9cdc6da040 Avoid access to the address register during auto-increment.
It cannot be ruled out that access to the address register triggers
an address auto-increment. Therefore a temporary address register
shadow is introduced to replace the access to the address regsiter.

Additionally there are several minor beautifications.
2013-12-03 21:31:43 +01:00
Ian Martin 0dafba4f6d Add a rule for generating assembly listings on mc1322x targets, for example: "make webserver6.lst". 2013-12-01 16:22:37 -05:00
Mariano Alvira 5fbefbd87b Merge pull request #459 from adamdunkels/push/mc1322x-stuff
MC1322x additions
2013-11-29 11:59:04 -08:00
Benoît Thébaudeau 1a696eb123 cc2538: gpio: Clear the power-up interrupts in the port ISRs
The pending GPIO power-up interrupts have to be cleared in the ISRs in order not
to re-trigger the interrupts and the wake-up events.

The power-up interrupts of all pins are cleared for each port in the
corresponding port ISR. This is done after calling the registered callbacks so
that the callbacks can know which pin woke up the SoC. This is done after
clearing the regular interrupt in order to avoid getting a new wake-up interrupt
without the regular interrupt in the case of a new wake-up edge occurring
between the two clears.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-11-26 22:20:05 +01:00
Benoît Thébaudeau 44a5c76884 cc2538: gpio: Add macros to use GPIO power-up interrupts
The GPIO power-up interrupts have to be configured and enabled in order to be
able to wake-up the SoC from PM1+ upon a signal edge occurring on a GPIO input
pin.

This set of macros allows to:
 - configure the signal edge triggering a power-up interrupt,
 - enable and disable a power-up interrupt,
 - clear a power-up interrupt flag.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-11-26 22:10:47 +01:00
Benoît Thébaudeau 621f4f7339 cc2538: lpm: Give access to the SRAM non-retention area for PM2
If PM2 is enabled with LPM_CONF_MAX_PM, but not active, the non-retention area
of the SRAM can be useful to place temporary data that does not fit in the
low-leakage SRAM, typically after having called lpm_set_max_pm(LPM_PM1). Hence,
give access to this non-retention area thanks to .nrdata* sections.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-11-25 15:43:37 +01:00
Benoît Thébaudeau 270ed237fd cc2538: usb: Make the GPIO driving the pull-up optional
The data sheet recommends that the USB pull-up resistor be driven by a GPIO so
that it can be controlled by software, but this is not mandatory. Hence, leave
the choice so that CC253-based boards not using this option can build and work
fine.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-11-25 15:15:35 +01:00
Benoît Thébaudeau d2f3795a30 cc2538: Clean up port and pin definitions
Homogenize port and pin definitions naming:
 - PERIPHERAL_FUNCTION_PORT for the port ID,
 - PERIPHERAL_FUNCTION_PIN for the pin ID,
 - PERIPHERAL_FUNCTION_PORT_BASE for the port base,
 - PERIPHERAL_FUNCTION_PIN_MASK for the pin mask.

Define only PERIPHERAL_FUNCTION_PORT and PERIPHERAL_FUNCTION_PIN in board.h, and
deduce PERIPHERAL_FUNCTION_PORT_BASE and PERIPHERAL_FUNCTION_PIN_MASK in the
driver from the former definitions.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2013-11-25 15:00:41 +01:00
Adam Dunkels bb2dcaa057 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00
Adam Dunkels e09ff3ff1e Merge pull request #438 from adamdunkels/push/cleanup-platforms
Massive platform cleanup
2013-11-24 01:59:53 -08:00
Adam Dunkels 1ab28e4668 Added missing argument declaration 2013-11-23 15:05:16 +01:00
Adam Dunkels e95236b642 Added header declarations for cc2538_rf_read_rssi() and cc2538_rf_set_promiscous_mode() 2013-11-23 15:05:16 +01:00