[riot-notifications] [RIOT-OS/RIOT] RDM: The 802.15.4 Radio HAL (#13943)

José Alamos notifications at github.com
Wed May 13 14:08:11 CEST 2020


What about now?
```
                                          +---------+
                                          |         |
                                          |   Off   |
                                          |         |
                                          +---------+
                                            ^     |
                                   off()*[1] |     | on()
                                            |     v
                                          +---------+
                                          |         |
                                          | TRX_OFF |
                                          |         |
                                          +---------+
                                            |     ^
                                            |     |
                        set_trx_state(IDLE) |     | RF_PLL_UNLOCK
                                            |     |
                                            v     |
          +---------+                     +---------+
          |         |                     |         |
          | CCA_BUSY|                     | PLL_BUSY|
          |         |                     |         |
          +---------+                     +---------+
            |      ^                        |     ^
RF_CCA_DONE |      |            RF_PLL_LOCK |     | set_trx_state(TRX_OFF)
            |      |                        |     |
            |      |                        |     |
            | cca()|                        v     |
            |      +----------------------+---------+  transmit()   +---------+
            +---------------------------->|         |-------------->|         |
                                          |   IDLE  |               | TX_BUSY |
                +------------------------>|         |<--------------|         |
                |       *[2]              +---------+  RF_TX_DONE   +---------+
                |                           ^    |
                |                           |    |
      RF_RX_DONE|       set_trx_state(IDLE) |    | set_trx_state(RX_ON)
                |                           |    |
                |                           |    |
                |                           |    v
         +---------+                     +---------+
         |         |                     |         |
         | RX_BUSY |<--------------------|  RX_ON  |
         |         |      SFD detected   |         |
         +---------+                     +---------+

*[1]: The off state can be accessed from any state.
*[2]: Although some radios stay in RX_ON, it's really "cheap'" to go back to
 IDLE (PLL_ON). So, all radios should be able to comply with 802.15.4
 time requirements.
```

The `RF_PLL_LOCK` and `RF_PLL_UNLOCK` are called from either the `irq_handler` or the `set_trx_state` (in case the radio doesn't provide a PLL IRQ like some CC radios).

We can provide a compile time configuration to make the ' set_trx_state` blocking (to comply with OpenThread and OpenWSN). Alternatively, we can try other mechanisms of synchronization in those cases (semaphores, etc).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13943#issuecomment-627938706
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200513/1abc9df9/attachment-0001.htm>


More information about the notifications mailing list