|
Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
PHY Test Functions. More...
#include <math.h>#include <stdio.h>#include <string.h>#include <time.h>#include "ca821x_api.h"#include "test15_4_phy_tests.h"
Macros | |
| #define | M1P5(x) ((x) + ((x) >> 1)) /* multiply by 1.5 */ |
Functions | |
| 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 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... | |
Variables | |
| uint8_t | PHY_TESTMODE |
| struct PHYTestPar | PHY_TESTPAR |
| struct PHYTestRes | PHY_TESTRES |
| uint8_t | PHY_TEST_INITIALISED |
PHY Test Functions.
| #define M1P5 | ( | x | ) | ((x) + ((x) >> 1)) /* multiply by 1.5 */ |
| 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_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_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 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 |
| uint8_t PHY_TEST_INITIALISED |
| uint8_t PHY_TESTMODE |
| struct PHYTestPar PHY_TESTPAR |
| struct PHYTestRes PHY_TESTRES |