cc1200: configurable tx-rx turaround time

This commit is contained in:
Simon Duquennoy 2016-09-23 09:39:58 +02:00
parent 5dd3d03699
commit ba739f679e
4 changed files with 5 additions and 1 deletions

View file

@ -158,6 +158,7 @@ const cc1200_rf_cfg_t cc1200_802154g_863_870_fsk_50kbps = {
.register_settings = preferredSettings,
.size_of_register_settings = sizeof(preferredSettings),
.tx_pkt_lifetime = (RTIMER_SECOND / 20),
.tx_rx_turnaround = (RTIMER_SECOND / 100),
.chan_center_freq0 = RF_CFG_CHAN_CENTER_F0,
.chan_spacing = RF_CFG_CHAN_SPACING,
.min_channel = RF_CFG_MIN_CHANNEL,

View file

@ -125,6 +125,7 @@ const cc1200_rf_cfg_t cc1200_868_fsk_1_2kbps = {
.register_settings = preferredSettings,
.size_of_register_settings = sizeof(preferredSettings),
.tx_pkt_lifetime = (2 * RTIMER_SECOND),
.tx_rx_turnaround = (RTIMER_SECOND / 2),
.chan_center_freq0 = RF_CFG_CHAN_CENTER_F0,
.chan_spacing = RF_CFG_CHAN_SPACING,
.min_channel = RF_CFG_MIN_CHANNEL,

View file

@ -67,6 +67,8 @@ typedef struct cc1200_rf_cfg {
* synch word + phy header, payload + CRC.
*/
rtimer_clock_t tx_pkt_lifetime;
/* The maximum time it takes to switch from Tx to Rx */
rtimer_clock_t tx_rx_turnaround;
/* Base frequency in kHz */
uint32_t chan_center_freq0;
/* Channel spacing in Hz */

View file

@ -802,7 +802,7 @@ transmit(unsigned short transmit_len)
*/
BUSYWAIT_UNTIL_STATE(STATE_RX,
RTIMER_SECOND / 100);
CC1200_RF_CFG.tx_rx_turnaround);
ENABLE_GPIO_INTERRUPTS();