Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
PHY Tests Definitions and Function Declarations. More...
#include <stddef.h>
#include <stdint.h>
Go to the source code of this file.
Classes | |
struct | PHYTestPar |
struct | PHYTestRes |
Macros | |
#define | PHY_TEST_OFF 0x00 |
Testmode Off. More... | |
#define | PHY_TEST_TX_PKT 0x01 |
Transmit Periodic Packets. More... | |
#define | PHY_TEST_TX_CONT 0x02 |
Transmit Continuous. More... | |
#define | PHY_TEST_RX_PER 0x03 |
Receive PER Test. More... | |
#define | PHY_TEST_RX_PSN 0x04 |
Receive Packet Sniffer. More... | |
#define | PHY_TEST_RX_EDSN 0x05 |
Receive Energy Detect Sniffer. More... | |
#define | PHY_TEST_LO_1 0x06 |
LO Test 1 (Closed Loop, Tx/Rx) More... | |
#define | PHY_TEST_LO_2 0x07 |
LO Test 2 (VCO Open Loop) More... | |
#define | PHY_TEST_LO_3 0x08 |
LO Test 3 (Locking Test) More... | |
#define | PHY_TEST_MAX PHY_TEST_LO_3 |
#define | PHY_TESTPAR_PACKETPERIOD 0x00 |
Packet Period [ms]. More... | |
#define | PHY_TESTPAR_PACKETLENGTH 0x01 |
Packet Length [bytes]. More... | |
#define | PHY_TESTPAR_NUMBEROFPKTS 0x02 |
Number of Packets for Test. More... | |
#define | PHY_TESTPAR_PACKETDATATYPE 0x03 |
Packet Data Type (Payload) More... | |
#define | PHY_TESTPAR_CHANNEL 0x04 |
TDME-PIB 802.15.4 Channel. More... | |
#define | PHY_TESTPAR_TXPOWER 0x05 |
TDME-PIB Transmit Power. More... | |
#define | PHY_TESTPAR_EDTHRESHOLD 0x06 |
TDME-PIB ED Threshold. More... | |
#define | PHY_TESTPAR_RX_FFSYNC 0x07 |
TDME-PIB Rx Flag False Sync. More... | |
#define | PHY_TESTPAR_LO_1_RXTXB 0x08 |
TDME-PIB LO Test 1 Tx/Rx. More... | |
#define | PHY_TESTPAR_LO_2_FDAC 0x09 |
TDME-PIB LO Test 2 FDAC Value. More... | |
#define | PHY_TESTPAR_LO_3_LOCKS 0x0A |
LO Test 3 Number of Locks per Tx/Rx Channel. More... | |
#define | PHY_TESTPAR_LO_3_PERIOD 0x0B |
LO Test 3 Locking Test Period [ms]. More... | |
#define | PHY_TESTPAR_ATM 0x0C |
TDME-PIB Analog Test Bus Configuration. More... | |
#define | PHY_TESTPAR_MPW2_OVWR 0x0D |
TDME-PIB MPW2 Overwrite. More... | |
#define | PHY_TESTPAR_MACENABLED 0x0E |
MAC Enabled for Test. More... | |
#define | PHY_TESTPAR_MAX PHY_TESTPAR_MACENABLED |
#define | PHY_TESTPAR_ALL (PHY_TESTPAR_MAX + 1) |
#define | PHY_TESTPARDEF_PACKETPERIOD 1000 |
#define | PHY_TESTPARDEF_PACKETLENGTH 20 |
#define | PHY_TESTPARDEF_NUMBEROFPKTS 10000 |
#define | PHY_TESTPARDEF_PACKETDATATYPE TDME_TXD_RANDOM |
#define | PHY_TESTPARDEF_CHANNEL 0x12 |
#define | PHY_TESTPARDEF_TXPOWER_IB 1 |
#define | PHY_TESTPARDEF_TXPOWER_PB 3 |
#define | PHY_TESTPARDEF_TXPOWER_BOOST 0 |
#define | PHY_TESTPARDEF_TXCONT 0 |
#define | PHY_TESTPARDEF_EDTHRESHOLD 0x80 |
#define | PHY_TESTPARDEF_RX_FFSYNC 0 |
#define | PHY_TESTPARDEF_LO_1_RXTXB 0 |
#define | PHY_TESTPARDEF_LO_2_FDAC 32 |
#define | PHY_TESTPARDEF_LO_3_LOCKS 20 |
#define | PHY_TESTPARDEF_LO_3_PERIOD 10 |
#define | PHY_TESTPARDEF_ATM 0x00 |
#define | PHY_TESTPARDEF_MPW2_OVWR 0x03 |
#define | PHY_TESTPARDEF_MACENABLED 0 |
#define | PHY_TEST_REPORT_PERIOD 5000 |
Report period in [ms]. More... | |
#define | TEST_STAT_ACCUM 0 /* accumulate */ |
#define | TEST_STAT_INIT 1 /* initialise */ |
#define | TEST_STAT_REPORT 2 /* averages for interim reporting */ |
#define | TEST_STAT_FINAL 3 /* averages for final reporting */ |
Functions | |
unsigned long | test15_4_getms (void) |
Returns the current time. More... | |
void | PHYTestModeHandler (struct ca821x_dev *pDeviceRef) |
Dispatch Branch for PHY Tests including Initialisation. More... | |
uint8_t | PHYTestInitialise (struct ca821x_dev *pDeviceRef) |
Sequential Initialisation of TDME. More... | |
void | PHYTestDeinitialise (struct ca821x_dev *pDeviceRef) |
Deinitialisation of TDME. More... | |
uint8_t | PHYTestTransmitPacket (struct ca821x_dev *pDeviceRef) |
PHY Test Transmit Packet. More... | |
void | PHYTestReceivePacketPER (struct ca821x_dev *pDeviceRef) |
PHY Test Receive Packet in PER Mode (Packet Error Rate) More... | |
void | PHYTestReceivePacketPSN (struct ca821x_dev *pDeviceRef) |
PHY Test Receive Packet in in PSN Mode (Packet Sniffer) More... | |
void | PHYTestReceiveED (struct ca821x_dev *pDeviceRef) |
PHY Test Receive in ED Detect Mode (Energy Sniffer) More... | |
uint8_t | PHYTestLOLocking (struct ca821x_dev *pDeviceRef) |
PHY Test LO_3 (Locking) Test. More... | |
void | PHYTestExit (char *errmsg) |
PHY Test Mode Exit. More... | |
void | PHYTestInitTestResults (void) |
PHY Test Initialise Results and Run Parameters. More... | |
void | PHYTestReset (void) |
PHY Test Reset Testmode PIB. More... | |
void | PHYTestStatistics (uint8_t mode, uint8_t ed, uint8_t cs, uint8_t fo) |
Calculate Test Statistics. More... | |
uint32_t | PHYTest_divu32round (uint32_t va, uint32_t vb) |
Division of Unsigned 32-Bit Values with Rounding. More... | |
int32_t | PHYTest_divs32round (int32_t va, int32_t vb) |
Division of Signed 32-Bit Values with Rounding. More... | |
uint8_t | PHYTestCalculateReportTime (uint8_t init) |
Calculate Time when to report Results. More... | |
void | PHYTestReportTestMode (void) |
Report Test Mode after Initialisation is done. More... | |
void | PHYTestReportTestParameters (uint8_t parameter) |
Report Test Parameter PIB. More... | |
void | PHYTestReportPacketTransmitted (struct MAC_Message *msg, uint8_t status) |
Report Successful Transmission of Packet. More... | |
void | PHYTestReportTransmitPacketAnalysis (void) |
Report Packet Transmission Analysis. More... | |
void | PHYTestReportPacketReceived (struct TDME_RXPKT_indication_pset *params) |
Report Reception of Packet. More... | |
void | PHYTestReportReceivedPacketAnalysis (void) |
Report Packet Reception Analysis. More... | |
void | PHYTestReportTestResult (void) |
Report Complete Test Result. More... | |
void | PHYTestReportEDReceived (struct TDME_EDDET_indication_pset *params) |
Report Reception of ED above Threshold. More... | |
void | PHYTestReportLOLocking (struct TDME_LOTLK_confirm_pset *params, uint8_t ntest) |
Report LO Test 3 Result (Locking Test) More... | |
void | PHYTestCfg (uint8_t val) |
PHY Change Test Configuration. More... | |
uint8_t | PHY_TESTMODE_request (uint8_t testmode, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for TDME_TESTMODE_request_sync. More... | |
uint8_t | PHY_SET_request (uint8_t evbme_attribute, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for TDME_SET_request_sync. More... | |
uint8_t | PHY_TXPKT_request (struct MAC_Message *msg, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for TDME_TXPKT_request_sync. More... | |
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. More... | |
int | PHY_RXPKT_indication (struct TDME_RXPKT_indication_pset *params, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for TDME_RXPKT_indication. More... | |
int | PHY_EDDET_indication (struct TDME_EDDET_indication_pset *params, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for TDME_EDDET_indication. More... | |
void | PHYTestMACAddInit (void) |
Address Initialisation. More... | |
uint8_t | PHYTestMACTxInitialise (struct ca821x_dev *pDeviceRef) |
Initialisation for using MAC layer in EVBME (Tx) More... | |
uint8_t | PHYTestMACRxInitialise (struct ca821x_dev *pDeviceRef) |
Initialisation for using MAC layer in EVBME (Rx) More... | |
uint8_t | PHYTestMACDeinitialise (struct ca821x_dev *pDeviceRef) |
Denitialisation for using MAC layer in EVBME. More... | |
uint8_t | PHY_TXPKT_MAC_request (struct MAC_Message *msg, struct ca821x_dev *pDeviceRef) |
uint8_t | PHY_RXPKT_MAC_indication (struct MCPS_DATA_indication_pset *params, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for MCPS_DATA_indication() More... | |
uint8_t | PHY_TXPKT_MAC_confirm (struct MCPS_DATA_confirm_pset *params, struct ca821x_dev *pDeviceRef) |
PHY Test Wrapper for MCPS_DATA_confirm() More... | |
Variables | |
uint8_t | PHY_TESTMODE |
struct PHYTestPar | PHY_TESTPAR |
struct PHYTestRes | PHY_TESTRES |
PHY Tests Definitions and Function Declarations.
#define PHY_TEST_LO_1 0x06 |
LO Test 1 (Closed Loop, Tx/Rx)
#define PHY_TEST_LO_2 0x07 |
LO Test 2 (VCO Open Loop)
#define PHY_TEST_LO_3 0x08 |
LO Test 3 (Locking Test)
#define PHY_TEST_MAX PHY_TEST_LO_3 |
#define PHY_TEST_OFF 0x00 |
Testmode Off.
#define PHY_TEST_REPORT_PERIOD 5000 |
Report period in [ms].
#define PHY_TEST_RX_EDSN 0x05 |
Receive Energy Detect Sniffer.
#define PHY_TEST_RX_PER 0x03 |
Receive PER Test.
#define PHY_TEST_RX_PSN 0x04 |
Receive Packet Sniffer.
#define PHY_TEST_TX_CONT 0x02 |
Transmit Continuous.
#define PHY_TEST_TX_PKT 0x01 |
Transmit Periodic Packets.
#define PHY_TESTPAR_ALL (PHY_TESTPAR_MAX + 1) |
#define PHY_TESTPAR_ATM 0x0C |
TDME-PIB Analog Test Bus Configuration.
#define PHY_TESTPAR_CHANNEL 0x04 |
TDME-PIB 802.15.4 Channel.
#define PHY_TESTPAR_EDTHRESHOLD 0x06 |
TDME-PIB ED Threshold.
#define PHY_TESTPAR_LO_1_RXTXB 0x08 |
TDME-PIB LO Test 1 Tx/Rx.
#define PHY_TESTPAR_LO_2_FDAC 0x09 |
TDME-PIB LO Test 2 FDAC Value.
#define PHY_TESTPAR_LO_3_LOCKS 0x0A |
LO Test 3 Number of Locks per Tx/Rx Channel.
#define PHY_TESTPAR_LO_3_PERIOD 0x0B |
LO Test 3 Locking Test Period [ms].
#define PHY_TESTPAR_MACENABLED 0x0E |
MAC Enabled for Test.
#define PHY_TESTPAR_MAX PHY_TESTPAR_MACENABLED |
#define PHY_TESTPAR_MPW2_OVWR 0x0D |
TDME-PIB MPW2 Overwrite.
#define PHY_TESTPAR_NUMBEROFPKTS 0x02 |
Number of Packets for Test.
#define PHY_TESTPAR_PACKETDATATYPE 0x03 |
Packet Data Type (Payload)
#define PHY_TESTPAR_PACKETLENGTH 0x01 |
Packet Length [bytes].
#define PHY_TESTPAR_PACKETPERIOD 0x00 |
Packet Period [ms].
#define PHY_TESTPAR_RX_FFSYNC 0x07 |
TDME-PIB Rx Flag False Sync.
#define PHY_TESTPAR_TXPOWER 0x05 |
TDME-PIB Transmit Power.
#define PHY_TESTPARDEF_ATM 0x00 |
#define PHY_TESTPARDEF_CHANNEL 0x12 |
#define PHY_TESTPARDEF_EDTHRESHOLD 0x80 |
#define PHY_TESTPARDEF_LO_1_RXTXB 0 |
#define PHY_TESTPARDEF_LO_2_FDAC 32 |
#define PHY_TESTPARDEF_LO_3_LOCKS 20 |
#define PHY_TESTPARDEF_LO_3_PERIOD 10 |
#define PHY_TESTPARDEF_MACENABLED 0 |
#define PHY_TESTPARDEF_MPW2_OVWR 0x03 |
#define PHY_TESTPARDEF_NUMBEROFPKTS 10000 |
#define PHY_TESTPARDEF_PACKETDATATYPE TDME_TXD_RANDOM |
#define PHY_TESTPARDEF_PACKETLENGTH 20 |
#define PHY_TESTPARDEF_PACKETPERIOD 1000 |
#define PHY_TESTPARDEF_RX_FFSYNC 0 |
#define PHY_TESTPARDEF_TXCONT 0 |
#define PHY_TESTPARDEF_TXPOWER_BOOST 0 |
#define PHY_TESTPARDEF_TXPOWER_IB 1 |
#define PHY_TESTPARDEF_TXPOWER_PB 3 |
#define TEST_STAT_ACCUM 0 /* accumulate */ |
#define TEST_STAT_FINAL 3 /* averages for final reporting */ |
#define TEST_STAT_INIT 1 /* initialise */ |
#define TEST_STAT_REPORT 2 /* averages for interim reporting */ |
int PHY_EDDET_indication | ( | struct TDME_EDDET_indication_pset * | params, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for TDME_EDDET_indication.
params | - eddet indication buffer |
pDeviceRef | - Device reference |
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.
ch | - 802.15.4 Channel to be tested |
rx_txb | - rx Mode to be tested when 1, Tx Mode when 0# |
ntest | - Number of Test |
pDeviceRef | - Device reference |
int PHY_RXPKT_indication | ( | struct TDME_RXPKT_indication_pset * | params, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for TDME_RXPKT_indication.
params | - rxpkt indication buffer |
pDeviceRef | - Device reference |
uint8_t PHY_RXPKT_MAC_indication | ( | struct MCPS_DATA_indication_pset * | params, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for MCPS_DATA_indication()
params | - MCPS data indication buffer |
pDeviceRef | - Device Reference |
uint8_t PHY_SET_request | ( | uint8_t | evbme_attribute, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for TDME_SET_request_sync.
evbme_attribute | - TDME Attribute |
pDeviceRef | - Device reference |
uint8_t PHY_TESTMODE_request | ( | uint8_t | testmode, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for TDME_TESTMODE_request_sync.
testmode | - Test mode |
pDeviceRef | - Device reference |
uint8_t PHY_TXPKT_MAC_confirm | ( | struct MCPS_DATA_confirm_pset * | params, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for MCPS_DATA_confirm()
params | - MCPS data confirm buffer |
pDeviceRef | - Device Reference |
uint8_t PHY_TXPKT_MAC_request | ( | struct MAC_Message * | msg, |
struct ca821x_dev * | pDeviceRef | ||
) |
uint8_t PHY_TXPKT_request | ( | struct MAC_Message * | msg, |
struct ca821x_dev * | pDeviceRef | ||
) |
PHY Test Wrapper for TDME_TXPKT_request_sync.
msg | - TDME TxPktReq MAC Message |
pDeviceRef | - Device reference |
int32_t PHYTest_divs32round | ( | int32_t | va, |
int32_t | vb | ||
) |
Division of Signed 32-Bit Values with Rounding.
va | - Dividend |
vb | - Divisor |
uint32_t PHYTest_divu32round | ( | uint32_t | va, |
uint32_t | vb | ||
) |
Division of Unsigned 32-Bit Values with Rounding.
va | - Dividend |
vb | - Divisor |
uint8_t PHYTestCalculateReportTime | ( | uint8_t | init | ) |
Calculate Time when to report Results.
init | - Initialise when 1 |
void PHYTestCfg | ( | uint8_t | val | ) |
PHY Change Test Configuration.
val | - Value to set the Configurations to |
void PHYTestDeinitialise | ( | struct ca821x_dev * | pDeviceRef | ) |
Deinitialisation of TDME.
pDeviceRef | - Device reference |
void PHYTestExit | ( | char * | errmsg | ) |
PHY Test Mode Exit.
errmsg | - Status to be reported |
uint8_t PHYTestInitialise | ( | struct ca821x_dev * | pDeviceRef | ) |
Sequential Initialisation of TDME.
pDeviceRef | - Device reference |
void PHYTestInitTestResults | ( | void | ) |
PHY Test Initialise Results and Run Parameters.
uint8_t PHYTestLOLocking | ( | struct ca821x_dev * | pDeviceRef | ) |
PHY Test LO_3 (Locking) Test.
pDeviceRef | - Device reference |
void PHYTestMACAddInit | ( | void | ) |
Address Initialisation.
uint8_t PHYTestMACDeinitialise | ( | struct ca821x_dev * | pDeviceRef | ) |
Denitialisation for using MAC layer in EVBME.
pDeviceRef | - Device Reference |
uint8_t PHYTestMACRxInitialise | ( | struct ca821x_dev * | pDeviceRef | ) |
Initialisation for using MAC layer in EVBME (Rx)
pDeviceRef | - Device Reference |
uint8_t PHYTestMACTxInitialise | ( | struct ca821x_dev * | pDeviceRef | ) |
Initialisation for using MAC layer in EVBME (Tx)
pDeviceRef | - Device Reference |
void PHYTestModeHandler | ( | struct ca821x_dev * | pDeviceRef | ) |
Dispatch Branch for PHY Tests including Initialisation.
pDeviceRef | - Device reference |
void PHYTestReceiveED | ( | struct ca821x_dev * | pDeviceRef | ) |
PHY Test Receive in ED Detect Mode (Energy Sniffer)
pDeviceRef | - Device reference |
void PHYTestReceivePacketPER | ( | struct ca821x_dev * | pDeviceRef | ) |
PHY Test Receive Packet in PER Mode (Packet Error Rate)
pDeviceRef | - Device reference |
void PHYTestReceivePacketPSN | ( | struct ca821x_dev * | pDeviceRef | ) |
PHY Test Receive Packet in in PSN Mode (Packet Sniffer)
pDeviceRef | - Device reference |
void PHYTestReportEDReceived | ( | struct TDME_EDDET_indication_pset * | params | ) |
Report Reception of ED above Threshold.
void PHYTestReportLOLocking | ( | struct TDME_LOTLK_confirm_pset * | params, |
uint8_t | ntest | ||
) |
Report LO Test 3 Result (Locking Test)
ntest | - Number of Test |
params | - TDME LOTLK confirm buffer |
void PHYTestReportPacketReceived | ( | struct TDME_RXPKT_indication_pset * | params | ) |
Report Reception of Packet.
void PHYTestReportPacketTransmitted | ( | struct MAC_Message * | msg, |
uint8_t | status | ||
) |
Report Successful Transmission of Packet.
void PHYTestReportReceivedPacketAnalysis | ( | void | ) |
Report Packet Reception Analysis.
void PHYTestReportTestMode | ( | void | ) |
Report Test Mode after Initialisation is done.
void PHYTestReportTestParameters | ( | uint8_t | parameter | ) |
Report Test Parameter PIB.
parameter | - Specific Parameter or PHY_TESTPAR_ALL |
void PHYTestReportTestResult | ( | void | ) |
Report Complete Test Result.
void PHYTestReportTransmitPacketAnalysis | ( | void | ) |
Report Packet Transmission Analysis.
void PHYTestReset | ( | void | ) |
PHY Test Reset Testmode PIB.
void PHYTestStatistics | ( | uint8_t | mode, |
uint8_t | ed, | ||
uint8_t | cs, | ||
uint8_t | fo | ||
) |
Calculate Test Statistics.
mode | mode: accumulation, initialisation, rollover report, final report rollover - rollover for reporting when 1 final - final calculations for end of test reporting |
ed | - Test Packet energy Detect Value |
cs | - Test Packet carrier sense value |
fo | - Test Packet count of falloffs |
uint8_t PHYTestTransmitPacket | ( | struct ca821x_dev * | pDeviceRef | ) |
PHY Test Transmit Packet.
pDeviceRef | - Device reference |
unsigned long test15_4_getms | ( | void | ) |
Returns the current time.
|
extern |
|
extern |
|
extern |