Commit Graph

73 Commits

Author SHA1 Message Date
George Oikonomou febf7b62c1 Allow frequency band-specific overrides 2017-05-13 15:57:42 +02:00
George Oikonomou d039080d19 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.
2017-05-13 15:57:40 +02:00
George Oikonomou a077db0c8f Make LNA bias trim offset configurable 2017-05-13 15:57:38 +02:00
George Oikonomou 4f7d13c0f9 Extend the RF core to support RF switches 2017-05-13 15:57:33 +02:00
George Oikonomou 45946b7422 Allow boards to explicitly provide an RSSI offset 2017-05-13 15:57:31 +02:00
George Oikonomou 95b3194e61 Allow boards to append to overrides 2017-05-13 15:57:29 +02:00
George Oikonomou ee501fb887 Delegate RF Front End and Bias settings to board.h 2017-05-13 15:57:27 +02: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
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
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 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
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 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 dc1f9fe010 Simplify MODESEL value determination 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
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
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
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
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