Commit graph

106 commits

Author SHA1 Message Date
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 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 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
George Oikonomou 171fe8d08e Adjust GPIO macros to reflect API in latest CCxxware 2016-07-17 00:25:17 +01:00
George Oikonomou 788cb1e119 Move ROM function macros to separate file 2016-07-17 00:25:17 +01:00
George Oikonomou dcad5e7e3f Merge pull request #1727 from g-oikonomou/contrib/cc26xx/trng
Add CC13xx/CC26xx TRNG Support
2016-07-16 23:34:53 +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
George Oikonomou 0313f9abf1 Merge pull request #1751 from atiselsts/bugfix/cc26xx_etimer_sleep
CC26xx: fix a regression in and refactor LPM code
2016-07-16 14:45:56 +01:00
Antonio Lignan 23a0449a97 Merge pull request #1753 from g-oikonomou/bugfix/cc26xx/missing-include
Add missing include
2016-06-30 22:53:45 +02:00
Atis Elsts b6617f17c5 CC26xx: always request HF crystal oscillator at radio on() 2016-06-29 16:41:33 +03:00
Atis Elsts 9caaf26012 CC26xx: fix a regression in and refactor LPM code 2016-06-29 01:03:06 +03:00
George Oikonomou de18c16c9f Add CC13xx/CC26xx RNG support to the build 2016-06-15 10:32:03 +01:00
George Oikonomou fd9d878e1d Implement random.h API for the CC13xx/CC26xx 2016-06-15 10:32:03 +01:00
George Oikonomou bb4056903c Add CC13xx/CC26xx TRNG driver 2016-06-15 10:32:03 +01:00
George Oikonomou f8864c67fd Add TRNG CCxxware macros 2016-06-15 10:30:17 +01: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 3a99639294 cc26xx: implement CC2650_FAST_RADIO_STARTUP option, required for TSCH 2016-06-14 00:54:33 +03:00
Atis Elsts a47fb723e4 cc26xx: enable sync between radio timer and RTC, useful for TSCH 2016-06-14 00:54:33 +03:00
Atis Elsts 95b66657aa cc26xx: add TSCH-related rtimer defines 2016-06-14 00:54:32 +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 678f4344d2 Add missing include 2016-06-13 12:04:47 +01:00
Antonio Lignan ee0b02c819 Merge pull request #1684 from g-oikonomou/contrib/cc26xx/aux-ctrl-and-adc
Add CC13xx/CC26xx AUX controller module, ADC support, ALS driver and example
2016-06-07 14:36:28 +02:00