Commit graph

131 commits

Author SHA1 Message Date
George Oikonomou 3cc5505b69 Merge pull request #1787 from g-oikonomou/contrib/cc26xx/improve-cca-monitoring
Use `ccaInfo.ccaState` to decide whether CCA is complete
2017-04-24 16:02:47 +01:00
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 dbd9d32daf CC26xx RF core: don't bail out from restarting the radio timer if just stopping it failed 2017-03-14 18:36:23 +00:00
Thanos Tsakiris dbcac67aab Normalize code style with uncrustify 2017-03-08 17:09:53 +02:00
Thanos Tsakiris d80f362a2b Adjust CC26xx/CC13xx ADC reading for gain and offset 2017-03-08 15:55:28 +02:00
Atis Elsts cd1bcb101d CC26xx IEEE mode radio: fix reading lqi 2017-01-26 13:31:15 +00:00
George Oikonomou 07de8b238b Easy manipulation of CC13xx Prop Mode RX buffers 2017-01-15 12:25:10 +00:00
George Oikonomou ba12ed2cce Re-initialise RX buffers each time we turn the RF on 2017-01-15 12:24:30 +00:00
George Oikonomou 7603e104c4 Allow band-specific RSSI offset override 2016-12-11 20:44:25 +00:00
George Oikonomou 47bda9b6be Provide additional overrides for the 470MHz frequency band 2016-12-11 20:44:25 +00:00
George Oikonomou c745199d53 Allow frequency band-specific overrides 2016-12-11 20:44:25 +00:00
George Oikonomou 5756248949 Factor-out CC13xx PROP mode TX power table
The CC13xx PROP mode TX power table can differ between boards as well as across frequency bands. This commit provides defaults for all bands and allows the board to override.
2016-12-11 20:41:00 +00:00
George Oikonomou 7ca3bea701 Make LNA bias trim offset configurable 2016-12-11 20:40:24 +00:00
George Oikonomou 6b7681c516 Extend the RF core to support RF switches 2016-12-11 16:54:11 +00:00
George Oikonomou e0e6f82c46 Allow boards to explicitly provide an RSSI offset 2016-12-11 16:54:10 +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
Jonas Olsson a56b520215 Make sure correct clocks is running in the RF Core (RFE). 2016-12-11 16:51:48 +00:00
Jonas Olsson 43b9679bcc Move setting of RF mode to correct place, needs to be called on every boot. 2016-12-11 16:51:48 +00:00
George Oikonomou e73ac7d26f Update to latest overrides and patches 2016-12-11 16:51:48 +00:00
Jonas Olsson db54175d8d Add missing structure from radio setup command. 2016-12-11 16:51:48 +00:00
George Oikonomou f07ed3fc01 Allow CC13xxware to automatically configure RTRIM for us 2016-12-11 16:51:48 +00:00
George Oikonomou 2934c6bbe7 Define RFC-related ccxxware macros 2016-12-11 16:51:48 +00:00
George Oikonomou 3a070bd332 Fix typo in TX power settings for prop mode (12.5 dBm) 2016-12-11 16:51:48 +00:00
George Oikonomou f9e6a78882 Update CMD_FS' fields to the current API 2016-12-11 16:51:47 +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 b67d3cc6ea Remove RF API header files
xxwares ship these headers now, so we will switch to using those versions. The exceptions are IEEE API headers, which are for not part of xxwares, so we have to keep them locally for now.
2016-12-11 16:51:47 +00:00
George Oikonomou 367104166e Update to latest CC13xxware/CC26xxware 2016-12-04 13:33:40 +00:00
g.oikonomou@bristol.ac.uk ec4b403e77 Allow and document IEEE mode for CC13xx 2016-10-07 10:05:14 +01:00
Antonio Lignan cb42bafbfb Merge pull request #1756 from g-oikonomou/contrib/cc26xx/new-ccxxwares
Update to latest TI CC13xxware/CC26xxware
2016-08-16 15:44:41 +02:00
Antonio Lignan 7ddbe640be Merge pull request #1795 from g-oikonomou/contrib/sensniff
Add generic sensniff example and remove legacy sniffers
2016-08-16 14:47:17 +02:00
George Oikonomou 983a618a36 Extend CC13xx PROP mode driver
We now write a dummy LQI in read() and we also add support for `RADIO_PARAM_RX_MODE` in `set_value()`
2016-08-12 01:23:50 +01:00
George Oikonomou dbd4f630fd Remove built-in sniffer support: CC13xx PROP mode 2016-08-12 01:23:49 +01:00
George Oikonomou 8ab0522cec Fix PROP mode channel switching
If `NETSTACK_CONF_RADIO.set_value(RADIO_PARAM_CHANNEL, ...)` is called when radio is on, it will fail to apply the channel change, because it won't re-send `CMD_PROP_RADIO_DIV_SETUP` and `CMD_PROP_FS`. This commit fixes this condition, by making sure the correct commands are sent to the radio.
2016-07-24 03:39:13 +01:00
George Oikonomou 2039b3a552 Use ccaInfo.ccaState to decide whether CCA is complete
This commit changes the logic of `get_cca_info()` in the CC26xx IEEE mode driver. We now use the command's return status bits to determine whether the radio's CCA monitoring function has concluded, instead of drawing conclusions based on RSSI readings.
2016-07-17 20:19:13 +01: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
George Oikonomou eec890d60e Update CC26xxware to v2.24.02.17202 2016-07-17 00:26:52 +01:00
George Oikonomou fd82603786 Update CC13xxware to v2.04.02.17240 2016-07-17 00:26:52 +01:00
George Oikonomou dc1f9fe010 Simplify MODESEL value determination 2016-07-17 00:26:52 +01:00
George Oikonomou 4495d14702 Make ROM bootloader configurable through contiki- or project-conf.h 2016-07-17 00:26:52 +01:00
George Oikonomou ccba6bdb20 Update cpu files to reflect API in latest CCxxware versions 2016-07-17 00:26:51 +01:00
George Oikonomou 0e4c02bf3b Update ChipInfo and OSC macros 2016-07-17 00:25:18 +01:00
George Oikonomou f68b77fdfa Remove ROM AUX timer macros
They have been undefined in CCxxwares
2016-07-17 00:25:17 +01:00