mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(ieee802154): add tx/rx report for IEEE802.15.4 debug
This commit is contained in:
parent
7e469f1330
commit
866bc77246
@ -449,6 +449,86 @@ static inline void ieee802154_ll_disable_coex(void)
|
||||
IEEE802154.pti.hw_ack_pti = 1;
|
||||
}
|
||||
|
||||
static inline void ieee802154_ll_clear_debug_cnt(uint32_t clear_bits)
|
||||
{
|
||||
IEEE802154.debug_cnt_clr.val = clear_bits;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_sfd_timeout_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_sfd_timeout_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_crc_error_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_crc_error_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_ed_abort_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_ed_abort_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_cca_fail_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_cca_fail_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_rx_fliter_fail_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_rx_filter_fail_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_no_rss_detect_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_no_rss_detect_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_rx_abort_coex_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_rx_abort_coex_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_rx_restart_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_rx_restart_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_tx_ack_abort_coex_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_tx_ack_abort_coex_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_ed_scan_coex_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_ed_scan_break_coex_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_rx_ack_abort_coex_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_rx_ack_abort_coex_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_rx_ack_timeout_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_rx_ack_timeout_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_tx_break_coex_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_tx_break_coex_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_tx_security_error_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_tx_security_error_cnt;
|
||||
}
|
||||
|
||||
static inline uint32_t ieee802154_ll_get_cca_busy_cnt(void)
|
||||
{
|
||||
return IEEE802154.debug_cca_busy_cnt;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -166,4 +166,11 @@ menu "IEEE 802.15.4"
|
||||
default 10
|
||||
help
|
||||
set the record abort table size
|
||||
|
||||
config IEEE802154_TXRX_STATISTIC
|
||||
bool "Enable record tx/rx packets information for debugging"
|
||||
depends on IEEE802154_DEBUG
|
||||
default n
|
||||
help
|
||||
Enabling this option to record the tx and rx
|
||||
endmenu # IEEE 802.15.4
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "hal/ieee802154_ll.h"
|
||||
#include "esp_ieee802154_util.h"
|
||||
#include "esp_log.h"
|
||||
@ -237,4 +238,122 @@ void ieee802154_assert_print(void)
|
||||
}
|
||||
#endif // CONFIG_IEEE802154_ASSERT
|
||||
|
||||
#if CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
static ieee802154_txrx_statistic_t s_ieee802154_txrx_statistic;
|
||||
|
||||
void ieee802154_txrx_statistic_clear(void)
|
||||
{
|
||||
memset(&s_ieee802154_txrx_statistic, 0, sizeof(ieee802154_txrx_statistic_t));
|
||||
}
|
||||
|
||||
void ieee802154_txrx_statistic(ieee802154_ll_events events)
|
||||
{
|
||||
if (events == IEEE802154_EVENT_TX_DONE) {
|
||||
s_ieee802154_txrx_statistic.tx.done_nums++;
|
||||
} else if (events == IEEE802154_EVENT_RX_DONE) {
|
||||
s_ieee802154_txrx_statistic.rx.done_nums++;
|
||||
}
|
||||
s_ieee802154_txrx_statistic.tx.abort.cca_busy_nums += ieee802154_ll_get_cca_busy_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_CCA_BUSY_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.tx.abort.tx_security_error_nums += ieee802154_ll_get_tx_security_error_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR);
|
||||
|
||||
// Do not record TX_BREAK_COEX_ERR due to ZB-105.
|
||||
|
||||
s_ieee802154_txrx_statistic.tx.abort.rx_ack_timeout_nums += ieee802154_ll_get_rx_ack_timeout_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.tx.abort.rx_ack_coex_break_nums += ieee802154_ll_get_rx_ack_abort_coex_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.tx.abort.cca_failed_nums += ieee802154_ll_get_cca_fail_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_CCA_FAIL_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.tx_ack_coex_break_nums += ieee802154_ll_get_tx_ack_abort_coex_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_TX_ACK_ABORT_COEX_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.rx_restart_nums += ieee802154_ll_get_rx_restart_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_RX_RESTART_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.rx_coex_break_nums += ieee802154_ll_get_rx_abort_coex_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_RX_ABORT_COEX_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.no_rss_nums += ieee802154_ll_get_no_rss_detect_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_NO_RSS_DETECT_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.filter_fail_nums += ieee802154_ll_get_rx_fliter_fail_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_RX_FILTER_FAIL_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.ed_abort_nums += ieee802154_ll_get_ed_abort_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_ED_ABORT_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.crc_error_nums += ieee802154_ll_get_crc_error_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_CRC_ERROR_CNT_CLEAR);
|
||||
s_ieee802154_txrx_statistic.rx.abort.sfd_timeout_nums += ieee802154_ll_get_sfd_timeout_cnt();
|
||||
ieee802154_ll_clear_debug_cnt(IEEE802154_SFD_TIMEOUT_CNT_CLEAR);
|
||||
}
|
||||
|
||||
void ieee802154_tx_nums_update(void)
|
||||
{
|
||||
s_ieee802154_txrx_statistic.tx.nums++;
|
||||
}
|
||||
|
||||
void ieee802154_tx_break_coex_nums_update(void)
|
||||
{
|
||||
s_ieee802154_txrx_statistic.tx.abort.tx_coex_break_nums++;
|
||||
}
|
||||
|
||||
void ieee802154_txrx_statistic_print(void)
|
||||
{
|
||||
uint64_t tx_success_nums = s_ieee802154_txrx_statistic.tx.done_nums - s_ieee802154_txrx_statistic.tx.abort.rx_ack_coex_break_nums - s_ieee802154_txrx_statistic.tx.abort.rx_ack_timeout_nums;
|
||||
uint64_t tx_abort_nums = s_ieee802154_txrx_statistic.tx.abort.rx_ack_coex_break_nums + s_ieee802154_txrx_statistic.tx.abort.rx_ack_timeout_nums +
|
||||
s_ieee802154_txrx_statistic.tx.abort.tx_coex_break_nums + s_ieee802154_txrx_statistic.tx.abort.tx_security_error_nums +
|
||||
s_ieee802154_txrx_statistic.tx.abort.cca_failed_nums + s_ieee802154_txrx_statistic.tx.abort.cca_busy_nums;
|
||||
|
||||
uint64_t tx_nums = s_ieee802154_txrx_statistic.tx.nums;
|
||||
float tx_success_ratio = (tx_nums > 0 ? ((float)tx_success_nums / tx_nums) : 0);
|
||||
float tx_done_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.done_nums / tx_nums) : 0);
|
||||
float tx_abort_ratio = (tx_nums > 0 ? ((float)tx_abort_nums / tx_nums) : 0);
|
||||
float tx_abort_rx_ack_coex_break_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.rx_ack_coex_break_nums / tx_nums) : 0);
|
||||
float tx_abort_rx_ack_timeout_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.rx_ack_timeout_nums / tx_nums) : 0);
|
||||
float tx_abort_tx_coex_break_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.tx_coex_break_nums / tx_nums) : 0);
|
||||
float tx_abort_tx_security_error_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.tx_security_error_nums / tx_nums) : 0);
|
||||
float tx_abort_cca_failed_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.cca_failed_nums / tx_nums) : 0);
|
||||
float tx_abort_cca_busy_ratio = (tx_nums > 0 ? ((float)s_ieee802154_txrx_statistic.tx.abort.cca_busy_nums / tx_nums) : 0);
|
||||
|
||||
uint64_t rx_abort_nums = s_ieee802154_txrx_statistic.rx.abort.tx_ack_coex_break_nums + s_ieee802154_txrx_statistic.rx.abort.sfd_timeout_nums +
|
||||
s_ieee802154_txrx_statistic.rx.abort.crc_error_nums + s_ieee802154_txrx_statistic.rx.abort.filter_fail_nums +
|
||||
s_ieee802154_txrx_statistic.rx.abort.no_rss_nums + s_ieee802154_txrx_statistic.rx.abort.rx_coex_break_nums +
|
||||
s_ieee802154_txrx_statistic.rx.abort.rx_restart_nums + s_ieee802154_txrx_statistic.rx.abort.ed_abort_nums;
|
||||
uint64_t rx_success_nums = s_ieee802154_txrx_statistic.rx.done_nums - s_ieee802154_txrx_statistic.rx.abort.tx_ack_coex_break_nums;
|
||||
|
||||
|
||||
ESP_LOGW(TAG, "+--------------------+-----------------------------------+--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-10s%-15llu%9.2f%%|%-25s%-15llu%9.2f%%|", "", "Done:", s_ieee802154_txrx_statistic.tx.done_nums, tx_done_ratio*100, "Success:", tx_success_nums, tx_success_ratio*100);
|
||||
ESP_LOGW(TAG, "+ +-----------------------------------+--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-15llu%9.2f%%|", "", "", "rx_ack_coex_break:", s_ieee802154_txrx_statistic.tx.abort.rx_ack_coex_break_nums, tx_abort_rx_ack_coex_break_ratio*100);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-15llu%9.2f%%|", "", "", "rx_ack_timeout:", s_ieee802154_txrx_statistic.tx.abort.rx_ack_timeout_nums, tx_abort_rx_ack_timeout_ratio*100);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-5s%-15llu|%-10s%-15llu%9.2f%%|%-25s%-15llu%9.2f%%|", "TX:", s_ieee802154_txrx_statistic.tx.nums, "Abort", tx_abort_nums, tx_abort_ratio*100, "tx_coex_break:", s_ieee802154_txrx_statistic.tx.abort.tx_coex_break_nums, tx_abort_tx_coex_break_ratio*100);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-15llu%9.2f%%|", "", "", "tx_security_error:", s_ieee802154_txrx_statistic.tx.abort.tx_security_error_nums, tx_abort_tx_security_error_ratio*100);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-15llu%9.2f%%|", "", "", "cca_failed:", s_ieee802154_txrx_statistic.tx.abort.cca_failed_nums, tx_abort_cca_failed_ratio*100);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-15llu%9.2f%%|", "", "", "cca_busy:", s_ieee802154_txrx_statistic.tx.abort.cca_busy_nums, tx_abort_cca_busy_ratio*100);
|
||||
ESP_LOGW(TAG, "+--------------------+-----------------------------------+--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-10s%-25llu|%-25s%-25llu|", "", "Done:", s_ieee802154_txrx_statistic.rx.done_nums, "Success:", rx_success_nums);
|
||||
ESP_LOGW(TAG, "+ +-----------------------------------+--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "tx_ack_coex_break:", s_ieee802154_txrx_statistic.rx.abort.tx_ack_coex_break_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "sfd_timeout:", s_ieee802154_txrx_statistic.rx.abort.sfd_timeout_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "crc_error:", s_ieee802154_txrx_statistic.rx.abort.crc_error_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-10s%-25llu|%-25s%-25llu|", "RX", "Abort", rx_abort_nums, "filter_fail:", s_ieee802154_txrx_statistic.rx.abort.filter_fail_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "no_rss:", s_ieee802154_txrx_statistic.rx.abort.no_rss_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "rx_coex_break:", s_ieee802154_txrx_statistic.rx.abort.rx_coex_break_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "rx_restart:", s_ieee802154_txrx_statistic.rx.abort.rx_restart_nums);
|
||||
ESP_LOGW(TAG, "+ + +--------------------------------------------------+");
|
||||
ESP_LOGW(TAG, "|%-20s|%-35s|%-25s%-25llu|", "", "", "ed_abort:", s_ieee802154_txrx_statistic.rx.abort.ed_abort_nums);
|
||||
ESP_LOGW(TAG, "+--------------------+-----------------------------------+--------------------------------------------------+");
|
||||
}
|
||||
|
||||
#endif // CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
|
||||
#endif // CONFIG_IEEE802154_DEBUG
|
||||
|
@ -456,6 +456,7 @@ static IRAM_ATTR void isr_handle_tx_abort(void)
|
||||
break;
|
||||
case IEEE802154_TX_ABORT_BY_TX_COEX_BREAK:
|
||||
IEEE802154_ASSERT(s_ieee802154_state == IEEE802154_STATE_TX || s_ieee802154_state == IEEE802154_STATE_TX_CCA);
|
||||
IEEE802154_TX_BREAK_COEX_NUMS_UPDATE();
|
||||
esp_ieee802154_transmit_failed(s_tx_frame, ESP_IEEE802154_TX_ERR_COEXIST);
|
||||
next_operation();
|
||||
break;
|
||||
@ -628,6 +629,7 @@ esp_err_t ieee802154_mac_init(void)
|
||||
esp_err_t ret = ESP_OK;
|
||||
modem_clock_module_mac_reset(PERIPH_IEEE802154_MODULE); // reset ieee802154 MAC
|
||||
ieee802154_pib_init();
|
||||
IEEE802154_TXRX_STATISTIC_CLEAR();
|
||||
|
||||
ieee802154_ll_enable_events(IEEE802154_EVENT_MASK);
|
||||
#if !CONFIG_IEEE802154_TEST
|
||||
@ -682,6 +684,7 @@ IEEE802154_STATIC void start_ed(uint32_t duration)
|
||||
|
||||
IEEE802154_STATIC void tx_init(const uint8_t *frame)
|
||||
{
|
||||
IEEE802154_TX_NUMS_UPDATE();
|
||||
s_tx_frame = (uint8_t *)frame;
|
||||
stop_current_operation();
|
||||
ieee802154_pib_update();
|
||||
|
@ -395,3 +395,15 @@ __attribute__((weak)) void esp_ieee802154_timer1_done(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#if CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
void esp_ieee802154_txrx_statistic_clear(void)
|
||||
{
|
||||
ieee802154_txrx_statistic_clear();
|
||||
}
|
||||
|
||||
void esp_ieee802154_txrx_statistic_print(void)
|
||||
{
|
||||
ieee802154_txrx_statistic_print();
|
||||
}
|
||||
#endif // CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
|
@ -586,6 +586,24 @@ esp_err_t esp_ieee802154_set_transmit_security(uint8_t *frame, uint8_t *key, uin
|
||||
*/
|
||||
esp_err_t esp_ieee802154_enh_ack_generator(uint8_t *frame, esp_ieee802154_frame_info_t *frame_info, uint8_t* enhack_frame);
|
||||
|
||||
/**
|
||||
* The configurable definitions via Kconfig
|
||||
*/
|
||||
#if CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
|
||||
/**
|
||||
* @brief Clear the current IEEE802.15.4 statistic.
|
||||
*
|
||||
*/
|
||||
void esp_ieee802154_txrx_statistic_clear(void);
|
||||
|
||||
/**
|
||||
* @brief Print the current IEEE802.15.4 statistic.
|
||||
*
|
||||
*/
|
||||
void esp_ieee802154_txrx_statistic_print(void);
|
||||
#endif // CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -25,6 +25,7 @@ extern "C" {
|
||||
#define IEEE802154_PROBE(a) do { \
|
||||
IEEE802154_RECORD_EVENT(a); \
|
||||
ieee802154_record_abort(a); \
|
||||
IEEE802154_TXRX_STATISTIC(a); \
|
||||
} while(0)
|
||||
|
||||
#if CONFIG_IEEE802154_RECORD_EVENT
|
||||
@ -180,6 +181,62 @@ void ieee802154_assert_print(void);
|
||||
#define IEEE802154_ASSERT(a) assert(a)
|
||||
#endif // CONFIG_IEEE802154_ASSERT
|
||||
|
||||
#if CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
typedef struct ieee802154_txrx_statistic{
|
||||
struct {
|
||||
uint64_t nums;
|
||||
uint64_t done_nums;
|
||||
struct {
|
||||
uint64_t rx_ack_coex_break_nums; // IEEE802154_RX_ACK_ABORT_COEX_CNT_REG
|
||||
uint64_t rx_ack_timeout_nums; // IEEE802154_RX_ACK_TIMEOUT_CNT_REG
|
||||
uint64_t tx_coex_break_nums; // IEEE802154_TX_BREAK_COEX_CNT_REG
|
||||
uint64_t tx_security_error_nums; // IEEE802154_TX_SECURITY_ERROR_CNT_REG
|
||||
uint64_t cca_failed_nums; // IEEE802154_CCA_FAIL_CNT_REG
|
||||
uint64_t cca_busy_nums; // IEEE802154_CCA_BUSY_CNT_REG
|
||||
} abort;
|
||||
} tx;
|
||||
struct {
|
||||
uint64_t done_nums;
|
||||
struct {
|
||||
uint64_t sfd_timeout_nums; // IEEE802154_SFD_TIMEOUT_CNT_REG
|
||||
uint64_t crc_error_nums; // IEEE802154_CRC_ERROR_CNT_REG
|
||||
uint64_t filter_fail_nums; // IEEE802154_RX_FILTER_FAIL_CNT_REG
|
||||
uint64_t no_rss_nums; // IEEE802154_NO_RSS_DETECT_CNT_REG
|
||||
uint64_t rx_coex_break_nums; // IEEE802154_RX_ABORT_COEX_CNT_REG
|
||||
uint64_t rx_restart_nums; // IEEE802154_RX_RESTART_CNT_REG
|
||||
uint64_t tx_ack_coex_break_nums; // IEEE802154_TX_ACK_ABORT_COEX_CNT_REG
|
||||
uint64_t ed_abort_nums; // IEEE802154_ED_ABORT_CNT_REG
|
||||
} abort;
|
||||
} rx;
|
||||
} ieee802154_txrx_statistic_t;
|
||||
|
||||
#define IEEE802154_TXRX_STATISTIC_CLEAR() do { \
|
||||
ieee802154_txrx_statistic_clear();\
|
||||
} while(0)
|
||||
|
||||
#define IEEE802154_TXRX_STATISTIC(a) do { \
|
||||
ieee802154_txrx_statistic(a);\
|
||||
} while(0)
|
||||
|
||||
#define IEEE802154_TX_NUMS_UPDATE() do { \
|
||||
ieee802154_tx_nums_update();\
|
||||
} while(0)
|
||||
|
||||
#define IEEE802154_TX_BREAK_COEX_NUMS_UPDATE() do { \
|
||||
ieee802154_tx_break_coex_nums_update();\
|
||||
} while(0)
|
||||
|
||||
void ieee802154_txrx_statistic_clear(void);
|
||||
void ieee802154_txrx_statistic_print(void);
|
||||
void ieee802154_txrx_statistic(ieee802154_ll_events events);
|
||||
void ieee802154_tx_nums_update(void);
|
||||
void ieee802154_tx_break_coex_nums_update(void);
|
||||
#else
|
||||
#define IEEE802154_TXRX_STATISTIC(a)
|
||||
#define IEEE802154_TX_NUMS_UPDATE()
|
||||
#define IEEE802154_TXRX_STATISTIC_CLEAR()
|
||||
#define IEEE802154_TX_BREAK_COEX_NUMS_UPDATE()
|
||||
#endif // CONFIG_IEEE802154_TXRX_STATISTIC
|
||||
|
||||
// TODO: replace etm code using common interface
|
||||
|
||||
|
@ -471,32 +471,32 @@ extern "C" {
|
||||
#define IEEE802154_SFD_TIMEOUT_CNT_CLEAR_S 14
|
||||
#define IEEE802154_CRC_ERROR_CNT_CLEAR (BIT(13))
|
||||
#define IEEE802154_CRC_ERROR_CNT_CLEAR_S 13
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR (BIT(12))
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR_S 12
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR (BIT(11))
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR_S 11
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR (BIT(10))
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR_S 10
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR (BIT(9))
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR_S 9
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR (BIT(8))
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR_S 8
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR (BIT(7))
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR_S 7
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR (BIT(12))
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR_S 12
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR (BIT(11))
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR_S 11
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR (BIT(10))
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR_S 10
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR (BIT(9))
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR_S 9
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR (BIT(8))
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR_S 8
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR (BIT(7))
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR_S 7
|
||||
#define IEEE802154_TX_ACK_ABORT_COEX_CNT_CLEAR (BIT(6))
|
||||
#define IEEE802154_TX_ACK_ABORT_COEX_CNT_CLEAR_S 6
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR (BIT(5))
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR_S 5
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR (BIT(4))
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR_S 4
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR (BIT(3))
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR_S 3
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR (BIT(2))
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR_S 2
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR (BIT(1))
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR_S 1
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR (BIT(0))
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR_S 0
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR (BIT(5))
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR_S 5
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR (BIT(4))
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR_S 4
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR (BIT(3))
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR_S 3
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR (BIT(2))
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR_S 2
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR (BIT(1))
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR_S 1
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR (BIT(0))
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR_S 0
|
||||
|
||||
#define IEEE802154_MAC_DATE_REG (IEEE802154_REG_BASE + 0x0184)
|
||||
#define IEEE802154_MAC_DATE 0xFFFFFFFF
|
||||
|
@ -472,32 +472,32 @@ extern "C" {
|
||||
#define IEEE802154_SFD_TIMEOUT_CNT_CLEAR_S 14
|
||||
#define IEEE802154_CRC_ERROR_CNT_CLEAR (BIT(13))
|
||||
#define IEEE802154_CRC_ERROR_CNT_CLEAR_S 13
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR (BIT(12))
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR_S 12
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR (BIT(11))
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR_S 11
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR (BIT(10))
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR_S 10
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR (BIT(9))
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR_S 9
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR (BIT(8))
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR_S 8
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR (BIT(7))
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR_S 7
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR (BIT(12))
|
||||
#define IEEE802154_RX_FILTER_FAIL_CNT_CLEAR_S 12
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR (BIT(11))
|
||||
#define IEEE802154_NO_RSS_DETECT_CNT_CLEAR_S 11
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR (BIT(10))
|
||||
#define IEEE802154_RX_ABORT_COEX_CNT_CLEAR_S 10
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR (BIT(9))
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR_S 9
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR (BIT(8))
|
||||
#define IEEE802154_RX_RESTART_CNT_CLEAR_S 8
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR (BIT(7))
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR_S 7
|
||||
#define IEEE802154_TX_ACK_ABORT_COEX_CNT_CLEAR (BIT(6))
|
||||
#define IEEE802154_TX_ACK_ABORT_COEX_CNT_CLEAR_S 6
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR (BIT(5))
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR_S 5
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR (BIT(4))
|
||||
#define IEEE802154_RX_ACK_ABORT_COEX_CNT_CLEAR_S 4
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR (BIT(3))
|
||||
#define IEEE802154_RX_ACK_TIMEOUT_CNT_CLEAR_S 3
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR (BIT(2))
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR_S 2
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR (BIT(1))
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR_S 1
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR (BIT(0))
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR_S 0
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR (BIT(5))
|
||||
#define IEEE802154_TX_BREAK_COEX_CNT_CLEAR_S 5
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR (BIT(4))
|
||||
#define IEEE802154_TX_SECURITY_ERROR_CNT_CLEAR_S 4
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR (BIT(3))
|
||||
#define IEEE802154_ED_ABORT_CNT_CLEAR_S 3
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR (BIT(2))
|
||||
#define IEEE802154_CCA_FAIL_CNT_CLEAR_S 2
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR (BIT(1))
|
||||
#define IEEE802154_CCA_BUSY_CNT_CLEAR_S 1
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR (BIT(0))
|
||||
#define IEEE802154_ED_SCAN_COEX_CNT_CLEAR_S 0
|
||||
|
||||
#define DEBUG_SEL_CFG0_REG (IEEE802154_REG_BASE + 0x184)
|
||||
#define DEBUG_FIELD3_SEL 0x0000001F
|
||||
|
Loading…
Reference in New Issue
Block a user