Commit graph

1551 commits

Author SHA1 Message Date
Oliver Schmidt 0151a7c27e Merge pull request #1706 from oliverschmidt/master
Make use of new cl65 option --print-target-path.
2016-06-03 15:13:08 +02:00
Oliver Schmidt ae0c5f0dd0 Make use of new cl65 option --print-target-path.
The new cl65 option --print-target-path allows to get rid of CC65_HOME altogether.
2016-06-03 13:30:25 +02:00
Simon Duquennoy 26bf33c762 Merge pull request #1550 from thomas-ha/tsch-cc2538-port
Port of TSCH for CC2538
2016-06-02 21:33:55 +02:00
Antonio Lignan 6fc4e2535c Merge pull request #1665 from g-oikonomou/contrib/cc26xx-bsl
Consolidate .upload for all CC26xx/CC13xx boards and add login make target
2016-06-01 23:37:29 +02:00
Antonio Lignan 9e1c378919 Merge pull request #1469 from wbober/nrf52dk-pr
Add support for nRF52 DK platform
2016-06-01 23:11:39 +02:00
Antonio Lignan f065971efc Merge pull request #1619 from simonduq/pr/tsch-rtimer16-fix
Fix bug in TSCH for platforms with 16-bit rtimer
2016-06-01 23:03:50 +02:00
Benoît Thébaudeau 09a7566e01 cc2538: coffee: Add default micro-log configuration
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-05-30 23:05:14 +02:00
Benoît Thébaudeau bd961d1cd3 cc2538: Fix possible linker script breakage
The conditional definitions in project-conf.h depending on
CONTIKI_TARGET_<TARGET_NAME> were ignored at link time, which broke the
linker script if it used these definitions, so the flashed applications
could crash or malfunction.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-05-30 23:05:14 +02:00
George Oikonomou 3a34b1f695 Merge pull request #1531 from bkozak-scanimetrics/cc26xx_cc13xx_lpm_fixes
Fixed numerous bugs in CC26xx-CC13xx lpm
2016-05-24 16:45:20 +01:00
Atis Elsts b608b837c2 Add login target to Makefile.cc26xx-cc13xx 2016-05-18 22:10:56 +01:00
George Oikonomou c5bea81bb6 Merge pull request #1530 from herjulf/avr-rss2
Adding AtMegaXXRFR2 support and avr-rss2 platform
2016-05-15 20:38:50 +01:00
Robert Olsson 18876a1fae Adding CRC valid check in rf230bb radios registermaps 2016-05-15 14:15:46 +02:00
George Oikonomou cd5a0ef291 Consolidate .upload for all CC26xx/CC13xx boards
The block that controls the `.upload` target is unnecessarily replicated in multiple sub-board Makefiles. This was originally done because the SmartRF and the Launchpad can be programmed with the c2538-bsl script, whereas the sensortag cannot.

This commit moves the `cc2538-bsl` / `.upload` target logic to the top level cpu Makefile (`cpu/cc26xx-cc13xx/Makefile.cc26xx-cc13xx`). Board makefiles simply set the make variable `BOARD_SUPPORTS_BSL` to 1 to signal that they can be programmed by the BSL script. If `BOARD_SUPPORTS_BSL` is not equal to 1, trying to use the `.upload` target will return an error message.

For example:

```
$ make BOARD=sensortag/cc2650 cc26xx-demo.upload
using saved target 'srf06-cc26xx'
This board cannot be programmed with the ROM bootloader and therefore does not support the .upload target.
```
2016-05-14 19:30:53 +01:00
Jens Dede 7f80b1ad57 Remove include of stdio.h 2016-05-04 11:12:37 +02:00
Jens Dede 59afae85e2 Use if instead of ifdef. Is more contiki standard-compliant 2016-05-02 22:34:58 +02:00
Jens Dede 119291d083 Fix putchar include when using IPv4 2016-05-02 19:13:26 +02:00
Simon Duquennoy bb5e5d5c6b TSCH: use RTIMER_CLOCK_DIFF to compute estimated drift, fixing a bug that would occur on 16-bit rtimer platforms 2016-04-27 14:13:33 +02:00
George Oikonomou 00d5645d16 Merge pull request #1601 from philrhinehart/bugfix-cc26xx-ble-events
cc26xx-cc13xx BLE beacon event issue
2016-04-18 20:06:33 +01:00
thomas-ha 3a76207b59 Use 64 bit values for MAC timer 2016-04-18 11:40:52 +02:00
Phil Rhinehart 5d5544151f Fixed bug in cc26xx-cc13xx rf-core. When running BLE in conjunction with ContikiMAC, oscillators were modified from an interrupt state causing occasional bus faults and infinite loops. We now check if BLE is active prior to modifiying the oscillators to avoid these conditions. 2016-04-18 17:17:07 +08:00
Phil Rhinehart 2a07dc0e0a This fixes an event handling issue in the cc26xx BLE driver. Currently, the rf_ble_beacon_process triggers the BLE beacon upon receiving any event, rather than verifying that the event timer has expired. This means that any PROCESS_BROADCAST (e.g. any sensor event) will fire the beacon. This commit adds logic to prevent this. 2016-04-18 17:14:37 +08:00
thomas-ha 6262025ef3 code style fixes and insert macros from .h 2016-04-15 15:50:20 +02:00
thomas-ha 3bf05d664e moving macros to .c 2016-04-15 15:50:01 +02:00
thomas-ha 5753fb5173 Clean up the driver
Move mac_timer_init() into set_poll_mode() and remove now unneccesary clear outs and mask outs of interrupt sources and pending interrupts
2016-04-07 15:41:15 +02:00
thomas-ha 9ac859a2af add send_on_cca if query 2016-04-07 15:17:44 +02:00
Oliver Schmidt 2c48f3b232 Added compatibility with W5100 shared access.
If the setup of socket 0 to 3 with 4+2+1+1KB is detected then the W5100 is _not_ initialized, otherwise it does set up socket 0 and 1 with 4KB each. Either way socket 0 is used - now with 4KB instead of 8KB as before.
2016-04-05 21:11:19 +02:00
Oliver Schmidt 4f28289df2 Added a pfs_remove() function and a pfs_seek() stub to the Commodore platforms.
- "Normalized" some Assembly code.
- Implemented CFS_APPEND in pfs_open().
- Made CFS_WRITE work in VICE's virtual disk/file system.
2016-03-28 14:07:35 +02:00
thomas-ha 4e446bc178 fix error 2016-03-23 10:16:06 +01:00
thomas-ha a4f575b8f0 use MAC timer instead of SFD interrupt 2016-03-23 09:08:54 +01:00
thomas-ha fb6e6d9ea3 macros for MAC timer 2016-03-22 18:51:05 +01:00
Michael LeMay 93126b57bb x86, galileo: Use IMRs to restrict DMA
This patch configures Isolated Memory Regions (IMRs) to block DMA to
code and data regions that do not contain any data that needs to be
DMA-accessible.
2016-03-17 08:35:49 -07:00
Michael LeMay 58a00b7c23 x86, galileo: Add driver for Isolated Memory Regions (IMRs)
The Intel Quark X1000 SoC includes support for Isolated Memory Regions
(IMRs), which are specified using range registers and associated
control registers that are accessible via the message bus.  This patch
adds a driver for accessing those registers.
2016-03-17 08:35:49 -07:00
Michael LeMay 25c07613c2 x86: Add driver for message bus
The Intel Quark X1000 SoC includes a message bus that is accessible
via PCI configuration registers.  It communicates to various SoC
components such as the Isolated Memory Region (IMR) registers and the
Remote Management Unit.  This patch adds a driver for accessing the
message bus.
2016-03-17 08:35:48 -07:00
thomas-ha 66a0bbcd24 renaming variables back to their original name 2016-03-16 16:38:04 +01:00
Nicolas Tsiftes 9ab327090c Merge pull request #1444 from mdlemay/galileo-always-init-gpio
galileo: Enable I2C and GPIO interrupt sharing and centralize their initialization
2016-03-14 20:09:40 +01:00
thomas-ha 217e623337 remove unused variables 2016-03-10 18:09:00 +01:00
thomas-ha 1b185392e4 make cc2538_sfd_rtime volatile 2016-03-08 16:17:40 +01:00
thomas-ha 73d36ebb6b SFD timestamp
Only save SFD timestamp when we are actually receiving.
2016-03-07 18:34:54 +01:00
Simon Duquennoy dea04c67d7 Change the default IPv6 prefix from aaaa::/64 to fd00::/64 2016-03-07 17:47:44 +01:00
thomas-ha b0a673ca5c Changes to enable TSCH
poll mode for TSCH including SFD timestamps and send_on_cca
2016-03-07 17:46:53 +01:00
thomas-ha b4c2cd9619 Macros for TSCH
US_TO_RTIMERTICKS(US) and RTIMERTICKS_TO_US(T)
2016-03-07 17:25:40 +01:00
Billy Kozak 786aa19cbd Fixed numeruous bus in CC26xx-CC13xx lpm
Bug fixes include:
- keep interrupts disabled during lpm_sleep() so that we don't
  miss any interrupts we may have been expecting
- check that the pending etimer isn't already expired (and don't sleep
  at all if it is)
- check that the about-to-be scheduled rtimer wakeup is neither too
  far into  the future nor too close into the future (or even in the
  past) before actually setting the interrupt (should fix #1509); If
  the time is out of bounds we use a default min or max value instead.
- Correctly handle LPM_MODE_MAX_SUPPORTED set to zero (and added a
  macro for the zero value) so that sleeping can be disabled altogether
- If no etimer is set, we specify a wakeup time which is reasonably far
  into the future instead of setting none at all (this will save on
  power consumption whenever no etimers are set).

Also did a bit of refactoring in that some long functions were broken
into multiple functions.
2016-02-23 10:41:01 -07:00
Robert Olsson d3980668ee Adding support for AtMega128RFR2 and AtMega256RFR2 2016-02-22 20:14:06 +01:00
Michael LeMay 58874ea25d x86, galileo: Refactor I2C and GPIO initialization
This patch revises the I2C and GPIO initialization code to always be
run during platform boot rather than within each process that requires
it.

This patch also revises the gpio-output example to use a pin that is
set as an output by the default pinmux configuration.  Previously, it
used a pin that was set as an output by the pinmux configuration that
is in effect when the OS does not change the pinmux configuration.
2016-02-16 21:19:44 -08:00
Michael LeMay c815fa4511 x86: Use shared ISR for I2C and GPIO
This patch permits interrupts to be generated by both the I2C and GPIO
controllers for simultaneously-executing applications. The controllers
share a single interrupt pin, INTC. Prior to this patch,
quarkX1000_gpio_init() routed INTA to PIRQC and IRQ 10 (due to an
incorrect assumption that INTA is connected to the GPIO controller),
and quarkX1000_i2c_init() routed INTC to PIRQC and IRQ 9. The I2C
controller initialization is a prerequisite for GPIO initialization,
so the final configuration was that INTA and INTC were both routed to
PIRQC and IRQ 10. Thus, only the GPIO ISR was being invoked, even if
the I2C controller was actually responsible for the interrupt.

This patch refactors the I2C and GPIO ISR setup and handler code so
that the shared portions are combined in
cpu/x86/drivers/legacy_pc/shared-isr.[ch].  The I2C and GPIO drivers
communicate their interrupt information to the shared component by
placing structures in a specific section of the binary.
2016-02-16 21:19:44 -08:00
Wojciech Bober 20f9515ed1 nrf52dk: cpu/nrf52832 support 2016-02-15 09:37:38 +01:00
George Oikonomou d42b1b50e5 Allow the caller to access the entire content of CMDSTA
When sending a command to the CC13xx/CC25xx RF core, we wait for command completion by checking the LSB of CMDSTA (correctly so). However, in doing so we also zero out the 3 CMDSTA return bytes. For some commands, those bytes contain useful information (e.g. an RSSI value) and are required by the caller.

This problem manifests itself e.g. in PROP mode `channel_clear()`, whereby the caller will always see an RSSI value of 0.

This pull therefore fixes the logic in `rf_core_send_cmd()` to check for command completion by blocking on the CMDSTA result byte without zeroing out the 3 return bytes.

Fixes #1465
2016-01-24 13:39:14 +00:00
George Oikonomou 707353f71b Remove Sensinode platform, cpu, example and tools files
This is part of a set of commits that will obsolete the Sensinode platform
2016-01-10 15:01:58 +00:00
George Oikonomou ab59a387b3 Merge pull request #1371 from g-oikonomou/bugfix/cc26xx/lpm-operation
Improve the stability of CC13xx/CC26xx low-power operation
2016-01-09 18:07:47 +00:00
George Oikonomou b97a3d1049 Merge pull request #1242 from g-oikonomou/contrib/cc26xx-ieee-volatile-cmd-ieee-tx
Use volatile access for CMD_IEEE_TX
2016-01-09 18:01:40 +00:00