Commit graph

35 commits

Author SHA1 Message Date
Benoît Thébaudeau ab1491be69 CC2538: Use CMSIS-CORE
Switch to CMSIS-CORE and remove the duplicate code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2016-11-24 22:30:26 +01:00
Antonio Lignan 2a84e68e6d cpu/cc2538: CCA threshold was fixed 2016-10-18 09:35:04 +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 a932dfa6df Remove built-in sniffer support: CC2538 2016-08-12 01:23:49 +01:00
George Oikonomou 568973f6ec Don't flush the CC2538 RF RX FIFO unconditionally
After reading a frame, `read()` checks the status of the RX FIFO:

* If an overflow is detected, the FIFO gets flushed
* If there are more frames in the FIFO, the `cc2538_rf_process` will get polled again in order to read out the next frame.

#1550 changed `read()`, which now performs the above check for non-poll mode, but it then flushes the FIFO unconditionally. Therefore, if there are two or more frames in the FIFO, they will get flushed before the `cc2538_rf_process` has had a chance to read them out. This results in missed frames.

Reproducing this is trivial: Build a CC2538 sniffer and see how it will never show you .15.4 ACK frames. ACK reception completes while `read()` is still streaming the previous captured frame to the host. Upon completion, the FIFO will get flushed and the ACK will get lost.

This pull proposes removing the unconditional flush and reverting to the original logic for non-TSCH operation.

Pinging @thomas-ha here for input regarding poll mode.

This pull sits on top of #1778
2016-07-17 00:24:47 +01:00
George Oikonomou 7fdb9849de Remove unnecessary parentheses 2016-07-16 22:35:23 +01:00
George Oikonomou c359e98bf1 Change mac_timer_init() to static
We also move the function to a different location so we won't have to provide the prototype separately
2016-07-16 17:11:58 +01:00
George Oikonomou 6ef9509dfb Change get_sfd_timestamp() to static
We also move the function to a different location so we won't have to provide the prototype separately
2016-07-16 17:11:57 +01:00
George Oikonomou 833dc89f7c Fix code style 2016-07-16 17:11:57 +01:00
thomas-ha 3a76207b59 Use 64 bit values for MAC timer 2016-04-18 11:40:52 +02:00
thomas-ha 6262025ef3 code style fixes and insert macros from .h 2016-04-15 15:50:20 +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
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 66a0bbcd24 renaming variables back to their original name 2016-03-16 16:38:04 +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
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
George Oikonomou 5288725af7 Use local variable to store RF on/off state
Fixes #823
2015-02-18 09:05:02 +01:00
Michael Karlsson 62fc6f2f07 corrected code style error 2015-02-13 13:46:57 +01:00
Michael Karlsson be9879cf18 fixed error in saving status 2015-01-21 22:35:30 +01:00
Michael Karlsson 37def294ce fixed bug that made radio die after error when not using default channel and/or not using a RDC protocol 2015-01-21 22:28:31 +01:00
Adam Dunkels 64f65b4e45 Merge pull request #617 from nfi/extended-radio-api
Extended radio API with support for setting channel, pan id, addressing modes, etc
2014-06-03 21:32:53 +02:00
George Oikonomou 08c884afa0 Improve the CC2538 extended RF API implementation
* Decouple 64-bit address from LINKADDR_SIZE
* get and set object from/to the start/end of the src/dest buffer
* We expect size == 8 (rather than size < 8) for both get_ and set_object. Error otherwise
* The RF no longer sets parameters by itself. We let the platform do this, using the extended API.
2014-04-23 12:20:16 +01:00
George Oikonomou 6028c0765f Don't hardcode min and max TX power values 2014-04-23 12:16:50 +01:00
Benoît Thébaudeau d93d129da6 cc2538: uart: Make it possible to use several UARTs simultaneously
This avoids the limitation of having a single UART available at runtime, without
duplicating code.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
2014-04-17 18:53:44 +02:00
George Oikonomou 0ec1eda75e Implement extended RF API for the CC2538 2014-04-14 15:25:30 +02:00
Niclas Finne a98e153e23 Added stub for extended radio API for cc2538 2014-04-03 13:38:23 +02:00
Adam Dunkels 45265249fc Changed the name of the rimeaddr module to linkaddr 2014-01-29 20:12:24 +01:00
Adam Dunkels 0fe08205e1 Moved the rimeaddr.[ch] code from the core/net/rime module to the core/net module, as it is used not only by rime code 2014-01-26 23:20:36 +01:00
Adam Dunkels 76f2a10c9a Added a function for setting promiscous mode on the CC2538 RF core 2013-11-23 15:05:15 +01:00
Adam Dunkels 473d519926 Added a way to obtain the RSSI from the CC2538 RF core 2013-11-23 15:05:15 +01:00
George Oikonomou 40f49948e6 New Platform: TI CC2538 Development Kit
This commit adds cpu, platform and example files,
providing support for running Contiki on TI's cc2538 DK
2013-04-06 21:07:31 +01:00