Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of EV-COG-AD3029LZ by
Diff: SimpleSpirit1.cpp
- Revision:
- 29:fe1b113f71d0
- Parent:
- 28:6a71e15d5272
- Child:
- 30:9c6dcfc47619
diff -r 6a71e15d5272 -r fe1b113f71d0 SimpleSpirit1.cpp
--- a/SimpleSpirit1.cpp Thu Nov 17 08:24:29 2016 +0100
+++ b/SimpleSpirit1.cpp Thu Nov 17 08:26:41 2016 +0100
@@ -116,8 +116,6 @@
irq_set_status(RX_FIFO_ERROR, S_ENABLE);
irq_set_status(RX_FIFO_ALMOST_FULL, S_ENABLE);
irq_set_status(VALID_SYNC, S_ENABLE);
- irq_set_status(MAX_BO_CCA_REACH, S_ENABLE);
- irq_set_status(READY, S_ENABLE); // betzw: gets never trigger ... WHY??? (to be investigated)
/* Configure Spirit1 */
radio_persistent_rx(S_ENABLE);
@@ -127,7 +125,7 @@
timer_set_rx_timeout_stop_condition(SQI_ABOVE_THRESHOLD);
timer_set_infinite_rx_timeout();
radio_afc_freeze_on_sync(S_ENABLE);
- calibration_rco(S_ENABLE); // betzw: test
+ calibration_rco(S_ENABLE);
spirit_on = OFF;
CLEAR_TXBUF();
@@ -146,7 +144,7 @@
/* Setup CSMA/CA */
CsmaInit x_csma_init = {
- S_ENABLE, // enable persistent mode // betzw: test
+ S_ENABLE, // enable persistent mode
TBIT_TIME_64, // Tcca time
TCCA_TIME_3, // Lcca length
3, // max nr of backoffs (<8)
@@ -465,15 +463,6 @@
/* get interrupt source from radio */
irq_get_status(&x_irq_status);
- /* Have become ready */
- if(x_irq_status.IRQ_READY) { // betzw: gets never trigger ... WHY??? (to be investigated)
-#ifdef DEBUG_IRQ
- uint32_t *tmp = (uint32_t*)&x_irq_status;
- debug("\n\r%s (%d): irq=%x", __func__, __LINE__, *tmp);
-#endif
- cmd_strobe(SPIRIT1_STROBE_RX);
- }
-
/* Reception errors */
if((x_irq_status.IRQ_RX_FIFO_ERROR) || (x_irq_status.IRQ_RX_DATA_DISC)) {
#ifdef DEBUG_IRQ
@@ -595,26 +584,6 @@
}
}
- /* Max number of back-off during CCA */
- if(x_irq_status.IRQ_MAX_BO_CCA_REACH) {
-#ifdef DEBUG_IRQ
- uint32_t *tmp = (uint32_t*)&x_irq_status;
- debug("\n\r%s (%d): irq=%x", __func__, __LINE__, *tmp);
-#endif
-
- _spirit_rx_err = false;
- _spirit_tx_started = false;
- csma_ca_state(S_DISABLE); // disable CSMA/CA
- // cmd_strobe(SPIRIT1_STROBE_RX); // data-sheet says that we will return to READY state automatically!
- CLEAR_TXBUF();
- CLEAR_RXBUF();
-
- /* call user callback */
- if(_current_irq_callback) {
- _current_irq_callback(TX_ERR);
- }
- }
-
/* The IRQ_VALID_SYNC is used to notify a new packet is coming */
if(x_irq_status.IRQ_VALID_SYNC) {
_is_receiving = true;
