Skip to content

Commit 211db10

Browse files
authored
Merge pull request #9828 from artokin/update_802154_rf_drivers
Update 802.15.4 RF drivers to the latest version
2 parents 0e7f112 + 05dc1f2 commit 211db10

File tree

6 files changed

+154
-49
lines changed

6 files changed

+154
-49
lines changed

components/802.15.4_RF/atmel-rf-driver/source/NanostackRfPhyAtmel.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ static uint8_t mac_tx_handle = 0;
112112
static uint8_t xah_ctrl_1;
113113

114114
/* Channel configurations for 2.4 and sub-GHz */
115-
static const phy_rf_channel_configuration_s phy_24ghz = {2405000000U, 5000000U, 250000U, 16U, M_OQPSK};
116-
static const phy_rf_channel_configuration_s phy_subghz = {868300000U, 2000000U, 250000U, 11U, M_OQPSK};
115+
static const phy_rf_channel_configuration_s phy_24ghz = {.channel_0_center_frequency = 2405000000U, .channel_spacing = 5000000U, .datarate = 250000U, .number_of_channels = 16U, .modulation = M_OQPSK};
116+
static const phy_rf_channel_configuration_s phy_subghz = {.channel_0_center_frequency = 868300000U, .channel_spacing = 2000000U, .datarate = 250000U, .number_of_channels = 11U, .modulation = M_OQPSK};
117117

118118
static const phy_device_channel_page_s phy_channel_pages[] = {
119119
{ CHANNEL_PAGE_0, &phy_24ghz},
@@ -1089,21 +1089,20 @@ static void rf_if_interrupt_handler(void)
10891089

10901090
/*Frame end interrupt (RX and TX)*/
10911091
if (irq_status & TRX_END) {
1092-
/*TX done interrupt*/
10931092
rf_trx_states_t trx_status = rf_if_trx_status_from_full(full_trx_status);
1094-
if (trx_status == PLL_ON || trx_status == TX_ARET_ON) {
1093+
if (rf_flags & RFF_TX) {
10951094
rf_handle_tx_end(trx_status);
1096-
}
1097-
/*Frame received interrupt*/
1098-
else {
1095+
} else if (rf_flags & RFF_RX) {
10991096
rf_handle_rx_end(trx_status);
1097+
} else {
1098+
//something went really wrong
11001099
}
11011100
}
11021101
if (irq_status & CCA_ED_DONE) {
11031102
rf_handle_cca_ed_done(full_trx_status);
11041103
}
11051104
if (irq_status & TRX_UR) {
1106-
// Here some counter could be used to monitor the underrun occurancy count.
1105+
// Here some counter could be used to monitor the under run occurrence count.
11071106
// Do not print anything here!
11081107
}
11091108
}

components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static const uint8_t pll_int[16] = {0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x
143143
static const uint16_t pll_frac[16] = {0x2800, 0x5000, 0x7800, 0xA000, 0xC800, 0xF000, 0x1800, 0x4000, 0x6800, 0x9000, 0xB800, 0xE000, 0x0800, 0x3000, 0x5800, 0x8000};
144144

145145
/* Channel configurations for 2.4 */
146-
static const phy_rf_channel_configuration_s phy_24ghz = {2405000000U, 5000000U, 250000U, 16U, M_OQPSK};
146+
static const phy_rf_channel_configuration_s phy_24ghz = {.channel_0_center_frequency = 2405000000U, .channel_spacing = 5000000U, .datarate = 250000U, .number_of_channels = 16U, .modulation = M_OQPSK};
147147

148148
static const phy_device_channel_page_s phy_channel_pages[] = {
149149
{ CHANNEL_PAGE_0, &phy_24ghz},

0 commit comments

Comments
 (0)