Commit Graph

38 Commits

Author SHA1 Message Date
George Oikonomou
7b193ee014 Merge pull request #1932 from g-oikonomou/contrib/cc1350/lp-and-st
Add support for the CC1350 LP and Sensortag
2017-04-24 15:34:22 +01:00
George Oikonomou
6a36a398bd Merge pull request #1931 from g-oikonomou/contrib/cc26xx-cc13xx/update-rf-api
Use TI-Provided CC13xx/CC26xx RF API
2017-04-24 15:33:14 +01:00
Bernhard Hackl
848f801460 Fix several uninitialized variables 2017-04-19 01:55:27 -07:00
George Oikonomou
6d51c1a9f9 Merge pull request #2138 from atiselsts/bugfix/cc26xx/limited_busywait
CC26xx IEEE mode driver fixes and robustness improvements
2017-03-17 23:09:11 +00:00
George Oikonomou
b91448dfa4 Merge pull request #1348 from g-oikonomou/bugfix/cc26xx/wait-for-rssi-valid
Wait for a valid RSSI reading in CC13xx/CC26xx RF drivers
2017-03-17 22:52:51 +00:00
Atis Elsts
c850bae186 CC26xx IEEE mode: introduce and use LIMITED_BUSYWAIT macro; avoids watchdog reboots in cases when the radio fails to turn off 2017-03-14 18:42:09 +00:00
Atis Elsts
3b090d97c7 CC26xx IEEE mode: more robust radio timer handling: do not crash the system in case the radio timer failed to start; allow the overflow checker to be called when the radio is off 2017-03-14 18:41:05 +00:00
Atis Elsts
cd1bcb101d CC26xx IEEE mode radio: fix reading lqi 2017-01-26 13:31:15 +00:00
George Oikonomou
6b7681c516 Extend the RF core to support RF switches 2016-12-11 16:54:11 +00:00
George Oikonomou
00944ec677 Allow boards to append to overrides 2016-12-11 16:54:10 +00:00
George Oikonomou
d9ea888323 Delegate RF Front End and Bias settings to board.h 2016-12-11 16:54:10 +00:00
George Oikonomou
a3c80cedb9 Adjust TX power settings to use current API fields 2016-12-11 16:51:47 +00:00
George Oikonomou
4d0051ad4d Switch to xxware-provided RF API headers 2016-12-11 16:51:47 +00:00
George Oikonomou
16f56abfad Wait for a valid RSSI reading in CC13xx/CC26xx RF drivers
As discussed in #1341, the current CC13xx/CC26xx IEEE mode driver sends `CMD_GET_RSSI` once and returns the RSSI reading uncondtionally. This happens within the `get_rssi()` function.

This logic is broken if `get_rssi()` is called with the radio off. The function will make sure to turn on the radio first, but it does not make sure the RSSI reading is valid, which only happens a number of symbol periods after the radio enters RX. The outcome is that `NETSTACK_RADIO.get_value(RADIO_PARAM_RSSI, ...)` will always return -128 (meaning that RSSI is unavailable) if the radio was off at the time of calling the function.

The same condition affects the prop mode driver.

This commit changes the logic of `get_rssi()`:
* For PROP mode, if `CMD_GET_RSSI` returns an invalid RSSI, we send it again. For unknown reasons, `CMD_GET_RSSI` on occasion returns 0, so we ignore that value too.
* For IEEE mode, we use `CMD_IEEE_CCA_REQ` and we inspect the value of `ccaInfo.ccaEnergy` of the return structure. If the value is 0x02 (Invalid), we send the command again.

Fixes #1341
2016-07-17 18:20:22 +01:00
Atis Elsts
2fe4b4d5bb CC26xx: enable MCU sleeping while transmitting if and only if not in poll mode 2016-07-16 18:22:20 +01:00
Atis Elsts
b6617f17c5 CC26xx: always request HF crystal oscillator at radio on() 2016-06-29 16:41:33 +03:00
Atis Elsts
e233c3f27f cc26xx: change CCA logic to be standard-compatible; change receiving_packet to return true iff sync (SFD) has been seen 2016-06-14 00:54:33 +03:00
Atis Elsts
d85667d535 cc26xx: packet queue changes: allow to read packets after radio has been turned off; make pending_packet() return true when there is a packets being received 2016-06-14 00:54:33 +03:00
Atis Elsts
54e4b5f351 cc26xx: allow IEEE 802.15.4 frames with version 2, required for TSCH 2016-06-14 00:54:33 +03:00
Atis Elsts
80aa30c5da cc26xx: add support for RADIO_PARAM_TX_MODE getting and setting and for LAST_RSSI and LAST_LQI reading 2016-06-14 00:54:33 +03:00
Atis Elsts
25c5f0b744 cc26xx: implement support for CC2650_FAST_RADIO_STARTUP 2016-06-14 00:54:33 +03:00
Atis Elsts
97c1cfc3b4 cc26xx: return the expected value 0 from prepare() in ieee and prop mode radio 2016-06-14 00:54:33 +03:00
Atis Elsts
e19fbc996e cc26xx: use CMD_IEEE_MOD_FILT to change address filtering instead of fully restarting the radio 2016-06-14 00:54:33 +03:00
Atis Elsts
ac6f8008fd cc26xx: implement poll mode, hardware timestamps, and other minor changes in the IEEE radio driver 2016-06-14 00:54:32 +03: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
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
George Oikonomou
109696174f Merge pull request #1350 from g-oikonomou/bugfix/cc26xx/tx-power
Correctly set new CC26xx TX power when the RFC is powered off
2016-01-09 17:59:24 +00:00
Benoît Thébaudeau
6166693a11 Merge pull request #1133 from bkozak-scanimetrics/cc-gcc
put gcc specific stuff into seperate .h
2015-12-05 00:39:59 +01:00
George Oikonomou
a63efe947f Merge pull request #1233 from adamdunkels/pr/26xx-13xx-fixes
CC26xx/CC13xx fixes
2015-11-09 08:33:58 +00:00
George Oikonomou
f401c7cc60 Save new TX power setting even if the RFC is powered off.
The current logic attempts to send `CMD_SET_TX_POWER` before saving the new power setting. If `CMD_SET_TX_POWER` fails the power setting will not get saved. As a result, when the RFC is powered off, all attempts to change TX power will fail.

This commit changes this logic to always save the new TX setting as requested by the user. If the RFC is powered up, we apply it immediately. If it is powered down, the new setting will automatically be applied next time we send `CMD_RADIO_SETUP`.

Fixes #1340
2015-11-01 20:56:52 +00:00
Billy Kozak
8e5f0bc36a Defining gcc specific macros in seperate header 2015-09-22 14:17:10 -06:00
Billy Kozak
324d03b53c CC26xx - fully shutdown the rf-core & abort rx op
Prior to this patch, the ieee radio driver did not explicitly abort
the rx operation or power down the analog components of the radio
prior to shutting down the rf-core.

The result of this was that the rf-core continued to use a lot of
power even while "off".

This patch fixes this problem.
2015-09-14 13:18:01 -06:00
George Oikonomou
4ce6d215e8 Use volatile access for CMD_IEEE_TX 2015-09-04 17:59:25 +01:00
Billy Kozak
b71353181d CC26xx - enable correct IRQ in rf_core_cmd_done_en
Fix for #1229

rf_core_cmd_done_en() was enabling the wrong irq for detecting the
completion of foreground operations. This was causing cc26xx devices
to not wake-up on time when calling lpm_sleep() from transmit().
2015-09-02 12:37:33 -06:00
Adam Dunkels
8d2dafbe30 No need to set the same channel again 2015-09-02 12:18:27 +02:00
Adam Dunkels
27e373492d Turn off energest listen in off() 2015-09-02 12:10:44 +02:00
Adam Dunkels
f1c4a5ee08 Turn off radio again after transmitting 2015-09-02 12:10:07 +02:00
Jonas Olsson
01e36532c2 Add support for the CC13xx CPU
This commit:

* Moves all cpu files from cpu/cc26xx to cpu/cc26xx-cc13xx
* Bumps the CC26xxware submodule to the latest TI release
* Adds CC13xxware as a submodule
* Adds support for sub-ghz mode / IEEE 802.15.4g
* Splits the driver into multiple files for clarity. We now have the following structure:
  * A common module that handles access to the RF core, interrupts etc
  * A module that takes care of BLE functionality
  * A netstack radio driver for IEEE mode (2.4GHz)
  * A netstack radio driver for PROP mode (sub-ghz - multiple bands)

This commit also adds tick suppression functionality, applicable to all chips of the CC26xx and CC13xx families. Instead waking up on every clock tick simply to increment our software counter, we now only wake up just in time to service the next scheduled etimer. ContikiMAC-triggered wakeups are unaffected.

Laslty, this commit also applies a number of minor changes:
* Addition of missing includes
* Removal of stub functions
* Removal of a woraround for a CC26xxware bug that has now been fixed
2015-08-23 19:54:42 +01:00