33 #ifndef TEST15_4_PHY_TESTS_H
34 #define TEST15_4_PHY_TESTS_H
42 #define PHY_TEST_OFF 0x00
43 #define PHY_TEST_TX_PKT 0x01
44 #define PHY_TEST_TX_CONT 0x02
45 #define PHY_TEST_RX_PER 0x03
46 #define PHY_TEST_RX_PSN 0x04
47 #define PHY_TEST_RX_EDSN 0x05
48 #define PHY_TEST_LO_1 0x06
49 #define PHY_TEST_LO_2 0x07
50 #define PHY_TEST_LO_3 0x08
51 #define PHY_TEST_MAX PHY_TEST_LO_3
56 #define PHY_TESTPAR_PACKETPERIOD 0x00
57 #define PHY_TESTPAR_PACKETLENGTH 0x01
58 #define PHY_TESTPAR_NUMBEROFPKTS 0x02
59 #define PHY_TESTPAR_PACKETDATATYPE 0x03
60 #define PHY_TESTPAR_CHANNEL 0x04
61 #define PHY_TESTPAR_TXPOWER 0x05
62 #define PHY_TESTPAR_EDTHRESHOLD 0x06
63 #define PHY_TESTPAR_RX_FFSYNC 0x07
64 #define PHY_TESTPAR_LO_1_RXTXB 0x08
65 #define PHY_TESTPAR_LO_2_FDAC 0x09
66 #define PHY_TESTPAR_LO_3_LOCKS 0x0A
67 #define PHY_TESTPAR_LO_3_PERIOD 0x0B
68 #define PHY_TESTPAR_ATM 0x0C
69 #define PHY_TESTPAR_MPW2_OVWR 0x0D
70 #define PHY_TESTPAR_MACENABLED 0x0E
71 #define PHY_TESTPAR_MAX PHY_TESTPAR_MACENABLED
72 #define PHY_TESTPAR_ALL (PHY_TESTPAR_MAX + 1)
74 #define PHY_TESTPARDEF_PACKETPERIOD 1000
75 #define PHY_TESTPARDEF_PACKETLENGTH 20
76 #define PHY_TESTPARDEF_NUMBEROFPKTS 10000
77 #define PHY_TESTPARDEF_PACKETDATATYPE TDME_TXD_RANDOM
78 #define PHY_TESTPARDEF_CHANNEL 0x12
79 #define PHY_TESTPARDEF_TXPOWER_IB 1
80 #define PHY_TESTPARDEF_TXPOWER_PB 3
81 #define PHY_TESTPARDEF_TXPOWER_BOOST 0
82 #define PHY_TESTPARDEF_TXCONT 0
83 #define PHY_TESTPARDEF_EDTHRESHOLD 0x80
84 #define PHY_TESTPARDEF_RX_FFSYNC 0
85 #define PHY_TESTPARDEF_LO_1_RXTXB 0
86 #define PHY_TESTPARDEF_LO_2_FDAC 32
87 #define PHY_TESTPARDEF_LO_3_LOCKS 20
88 #define PHY_TESTPARDEF_LO_3_PERIOD 10
89 #define PHY_TESTPARDEF_ATM 0x00
90 #define PHY_TESTPARDEF_MPW2_OVWR 0x03
91 #define PHY_TESTPARDEF_MACENABLED 0
144 #define PHY_TEST_REPORT_PERIOD 5000
147 #define TEST_STAT_ACCUM 0
148 #define TEST_STAT_INIT 1
149 #define TEST_STAT_REPORT 2
150 #define TEST_STAT_FINAL 3
evbme_attribute
EVBME attribute ids for use with EVBME_SET_REQUEST and EVBME_GET_REQUEST.
Definition: evbme_messages.h:73
SPI Message Format Typedef.
Definition: mac_messages.h:1017
MCPS_DATA_confirm parameter set.
Definition: mac_messages.h:357
MCPS_DATA_indication parameter set.
Definition: mac_messages.h:384
Definition: test15_4_phy_tests.h:95
uint8_t ATM
TDME-PIB Analog Test Bus Configuration.
Definition: test15_4_phy_tests.h:111
uint8_t LO_3_LOCKS
LO Test 3 Number of Locks per Tx/Rx Channel.
Definition: test15_4_phy_tests.h:109
uint8_t TXCONT
Definition: test15_4_phy_tests.h:104
uint8_t TXPOWER_PB
TDME-PIB Transmit Power Amp Frequency Trim.
Definition: test15_4_phy_tests.h:102
uint8_t RX_FFSYNC
TDME-PIB Rx Flag False Sync.
Definition: test15_4_phy_tests.h:106
uint8_t LO_3_PERIOD
LO Test 3 Locking Test Period [ms].
Definition: test15_4_phy_tests.h:110
uint8_t LO_1_RXTXB
TDME-PIB LO Test 1 Tx/Rx.
Definition: test15_4_phy_tests.h:107
uint8_t PACKETDATATYPE
Packet Data Type (Payload)
Definition: test15_4_phy_tests.h:99
uint8_t EDTHRESHOLD
TDME-PIB ED Threshold.
Definition: test15_4_phy_tests.h:105
uint8_t MACENABLED
MAC Enabled for Test.
Definition: test15_4_phy_tests.h:113
uint8_t CHANNEL
TDME-PIB 802.15.4 Channel.
Definition: test15_4_phy_tests.h:100
uint16_t PACKETPERIOD
Packet Period [ms].
Definition: test15_4_phy_tests.h:96
uint8_t PACKETLENGTH
Packet Length [bytes].
Definition: test15_4_phy_tests.h:97
uint8_t TXPOWER_IB
TDME-PIB Transmit Power Amp Current.
Definition: test15_4_phy_tests.h:101
uint8_t MPW2_OVWR
TDME-PIB MPW2 Overwrite.
Definition: test15_4_phy_tests.h:112
uint8_t TXPOWER_BOOST
TDME-PIB Transmit Boost Mode.
Definition: test15_4_phy_tests.h:103
uint32_t NUMBEROFPKTS
Number of Packets for Test.
Definition: test15_4_phy_tests.h:98
uint8_t LO_2_FDAC
TDME-PIB LO Test 2 FDAC Value.
Definition: test15_4_phy_tests.h:108
Definition: test15_4_phy_tests.h:118
uint8_t CS_MAX
Maximum CS Value.
Definition: test15_4_phy_tests.h:137
uint8_t ED_MIN
Minimum ED Value.
Definition: test15_4_phy_tests.h:136
uint32_t PHRERR_COUNT
Error Counter for PHR (Packet Header) Errors.
Definition: test15_4_phy_tests.h:125
uint8_t CS_MIN
Minimum CS Value.
Definition: test15_4_phy_tests.h:138
uint32_t CS_AVG
Averaged CS Value (between Analysis Reports)
Definition: test15_4_phy_tests.h:131
uint32_t PACKET_COUNT
Packet Count.
Definition: test15_4_phy_tests.h:120
uint32_t ED_AVG
Averaged ED Value (between Analysis Reports)
Definition: test15_4_phy_tests.h:130
uint32_t LOERR_COUNT
Error Counter for LO Locking Failures.
Definition: test15_4_phy_tests.h:123
uint32_t CRCERR_COUNT
Error Counter for CRC/FCS Errors.
Definition: test15_4_phy_tests.h:124
uint8_t TEST_RUNNING
Test Running Flag.
Definition: test15_4_phy_tests.h:122
int32_t FO_AVG
Averaged Frequency Offset (between Analysis Reports)
Definition: test15_4_phy_tests.h:129
uint8_t ED_MAX
Maximum ED Value.
Definition: test15_4_phy_tests.h:135
int32_t FO_AVG_TOTAL
Total Averaged Frequency Offset.
Definition: test15_4_phy_tests.h:132
uint32_t PREERR_COUNT
Error Counter for Preamble Errors.
Definition: test15_4_phy_tests.h:127
uint32_t ED_AVG_TOTAL
Total Averaged ED Value.
Definition: test15_4_phy_tests.h:133
uint8_t PACKET_RECEIVED
Packet Received Flag.
Definition: test15_4_phy_tests.h:121
uint32_t SHRERR_COUNT
Error Counter for SHR (SFD) Errors.
Definition: test15_4_phy_tests.h:126
uint16_t SEQUENCENUMBER
Packet Sequence Number (SN)
Definition: test15_4_phy_tests.h:119
uint32_t CS_AVG_TOTAL
Total Averaged CS Value.
Definition: test15_4_phy_tests.h:134
uint32_t MISSED_COUNT
Error Counter for Missed Packets.
Definition: test15_4_phy_tests.h:128
TDME_EDDET_indication parameter set.
Definition: mac_messages.h:641
TDME_LOTLK_confirm parameter set.
Definition: mac_messages.h:656
TDME_RXPKT_indication parameter set.
Definition: mac_messages.h:630
CA-821x Device reference struct.
Definition: ca821x_api.h:123
struct PHYTestRes PHY_TESTRES
Definition: test15_4_phy_tests.c:47
void PHYTestReportPacketReceived(struct TDME_RXPKT_indication_pset *params)
Report Reception of Packet.
Definition: test15_4_phy_tests.c:739
uint8_t PHY_TESTMODE_request(uint8_t testmode, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_TESTMODE_request_sync.
Definition: test15_4_phy_tests.c:879
void PHYTestReportTestMode(void)
Report Test Mode after Initialisation is done.
Definition: test15_4_phy_tests.c:618
struct PHYTestPar PHY_TESTPAR
Definition: test15_4_phy_tests.c:46
void PHYTestDeinitialise(struct ca821x_dev *pDeviceRef)
Deinitialisation of TDME.
Definition: test15_4_phy_tests.c:173
void PHYTestReportTransmitPacketAnalysis(void)
Report Packet Transmission Analysis.
Definition: test15_4_phy_tests.c:732
uint8_t PHY_TESTMODE
Definition: test15_4_phy_tests.c:45
uint8_t PHYTestTransmitPacket(struct ca821x_dev *pDeviceRef)
PHY Test Transmit Packet.
Definition: test15_4_phy_tests.c:201
void PHYTestReportPacketTransmitted(struct MAC_Message *msg, uint8_t status)
Report Successful Transmission of Packet.
Definition: test15_4_phy_tests.c:713
uint8_t PHYTestLOLocking(struct ca821x_dev *pDeviceRef)
PHY Test LO_3 (Locking) Test.
Definition: test15_4_phy_tests.c:365
void PHYTestReceivePacketPSN(struct ca821x_dev *pDeviceRef)
PHY Test Receive Packet in in PSN Mode (Packet Sniffer)
Definition: test15_4_phy_tests.c:320
uint8_t PHY_TXPKT_MAC_confirm(struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for MCPS_DATA_confirm()
Definition: test15_4_phy_tests_mac.c:251
unsigned long test15_4_getms(void)
Returns the current time.
Definition: test15_4_evbme.c:56
uint8_t PHYTestInitialise(struct ca821x_dev *pDeviceRef)
Sequential Initialisation of TDME.
Definition: test15_4_phy_tests.c:103
void PHYTestReportEDReceived(struct TDME_EDDET_indication_pset *params)
Report Reception of ED above Threshold.
Definition: test15_4_phy_tests.c:831
uint8_t PHY_LOTLK_request(uint8_t ch, uint8_t rx_txb, uint8_t ntest, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_LOTLK_request_sync.
Definition: test15_4_phy_tests.c:992
uint8_t PHYTestMACTxInitialise(struct ca821x_dev *pDeviceRef)
Initialisation for using MAC layer in EVBME (Tx)
Definition: test15_4_phy_tests_mac.c:75
void PHYTestInitTestResults(void)
PHY Test Initialise Results and Run Parameters.
Definition: test15_4_phy_tests.c:426
uint8_t PHYTestMACRxInitialise(struct ca821x_dev *pDeviceRef)
Initialisation for using MAC layer in EVBME (Rx)
Definition: test15_4_phy_tests_mac.c:126
uint8_t PHYTestMACDeinitialise(struct ca821x_dev *pDeviceRef)
Denitialisation for using MAC layer in EVBME.
Definition: test15_4_phy_tests_mac.c:168
void PHYTestReportTestParameters(uint8_t parameter)
Report Test Parameter PIB.
Definition: test15_4_phy_tests.c:657
uint8_t PHY_RXPKT_MAC_indication(struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for MCPS_DATA_indication()
Definition: test15_4_phy_tests_mac.c:274
void PHYTestCfg(uint8_t val)
PHY Change Test Configuration.
Definition: test15_4_phy_tests.c:861
void PHYTestModeHandler(struct ca821x_dev *pDeviceRef)
Dispatch Branch for PHY Tests including Initialisation.
Definition: test15_4_phy_tests.c:70
void PHYTestReceivePacketPER(struct ca821x_dev *pDeviceRef)
PHY Test Receive Packet in PER Mode (Packet Error Rate)
Definition: test15_4_phy_tests.c:248
uint8_t PHY_TXPKT_request(struct MAC_Message *msg, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_TXPKT_request_sync.
Definition: test15_4_phy_tests.c:967
void PHYTestStatistics(uint8_t mode, uint8_t ed, uint8_t cs, uint8_t fo)
Calculate Test Statistics.
Definition: test15_4_phy_tests.c:475
int32_t PHYTest_divs32round(int32_t va, int32_t vb)
Division of Signed 32-Bit Values with Rounding.
Definition: test15_4_phy_tests.c:568
void PHYTestReportTestResult(void)
Report Complete Test Result.
Definition: test15_4_phy_tests.c:793
uint8_t PHY_SET_request(uint8_t evbme_attribute, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_SET_request_sync.
Definition: test15_4_phy_tests.c:918
void PHYTestReportReceivedPacketAnalysis(void)
Report Packet Reception Analysis.
Definition: test15_4_phy_tests.c:764
void PHYTestReportLOLocking(struct TDME_LOTLK_confirm_pset *params, uint8_t ntest)
Report LO Test 3 Result (Locking Test)
Definition: test15_4_phy_tests.c:846
void PHYTestReceiveED(struct ca821x_dev *pDeviceRef)
PHY Test Receive in ED Detect Mode (Energy Sniffer)
Definition: test15_4_phy_tests.c:354
void PHYTestExit(char *errmsg)
PHY Test Mode Exit.
Definition: test15_4_phy_tests.c:420
uint8_t PHYTestCalculateReportTime(uint8_t init)
Calculate Time when to report Results.
Definition: test15_4_phy_tests.c:592
void PHYTestMACAddInit(void)
Address Initialisation.
Definition: test15_4_phy_tests_mac.c:66
int PHY_RXPKT_indication(struct TDME_RXPKT_indication_pset *params, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_RXPKT_indication.
Definition: test15_4_phy_tests.c:1014
uint8_t PHY_TXPKT_MAC_request(struct MAC_Message *msg, struct ca821x_dev *pDeviceRef)
Definition: test15_4_phy_tests_mac.c:185
uint32_t PHYTest_divu32round(uint32_t va, uint32_t vb)
Division of Unsigned 32-Bit Values with Rounding.
Definition: test15_4_phy_tests.c:557
void PHYTestReset(void)
PHY Test Reset Testmode PIB.
Definition: test15_4_phy_tests.c:451
int PHY_EDDET_indication(struct TDME_EDDET_indication_pset *params, struct ca821x_dev *pDeviceRef)
PHY Test Wrapper for TDME_EDDET_indication.
Definition: test15_4_phy_tests.c:1047