Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
hwme_tdme.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019, Cascoda Ltd.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * 3. Neither the name of the copyright holder nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
27 */
39
40#ifndef HWME_TDME_H
41#define HWME_TDME_H
42
43#include "ca821x_config.h"
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49#define MAX_HWME_ATTRIBUTE_SIZE 16
50#define MAX_TDME_ATTRIBUTE_SIZE 2
51
52#define MAX_TXPOWER 8
53#define MAX_TXPOWER_CH26 4
54
57{
58 HWME_SUCCESS = 0x00,
59 HWME_UNKNOWN = 0x01,
60 HWME_INVALID = 0x02,
62};
63
75
78{
81};
82
83#if CASCODA_CA_VER >= 8212
85enum dcdc_level_mode
86{
87 HWME_DCDCMODE_OFF = 0x00,
88 HWME_DCDCMODE_TRXONLY = 0x01,
89 HWME_DCDCMODE_ALWAYSON = 0x02,
90};
91
93enum dcdc_frequency_tracking_mode
94{
95 HWME_FREQ_TRACKING_DISABLED = 0x00,
96 HWME_FREQ_TRACKING_ENABLED = 0x01,
97};
98
100enum dcdc_bod_mode
101{
102 HWME_BODMODE_OFF = 0x00,
103 HWME_BODMODE_DCDC = 0x01,
104 HWME_BODMODE_ALWAYSON = 0x02,
105};
106
108enum rcosc_tracking_mode
109{
110 HWME_RCOSC_TRMD_OFF = 0x00,
111 HWME_RCOSC_TRMD_GUARD = 0x01,
112 HWME_RCOSC_TRMD_GUARDR = 0x02,
113 HWME_RCOSC_TRMD_INST = 0x03,
114};
115
117enum csmaca_mode
118{
119 HWME_CSMACAMODE_OFF = 0x00,
120 HWME_CSMACAMODE_ON = 0x01,
121};
122#endif // CASCODA_CA_VER >= 8212
123
126{
128 HWME_CHIPID = 0x01,
141 HWME_HSKEY = 0x0E,
145#if CASCODA_CA_VER >= 8211
146 HWME_RXMODE = 0x12,
147 HWME_POLLINDMODE = 0x13,
148 HWME_ENHANCEDFP = 0x14,
149 HWME_MAXDIRECTS = 0x15,
150 HWME_MAXINDIRECTS = 0x16,
151#endif // CASCODA_CA_VER >= 8211
152#if CASCODA_CA_VER >= 8212
153 HWME_DCDCMODE = 0x18,
154 HWME_RCOSCTRMODE = 0x19,
155 HWME_LOTXCALVALUES = 0x1A,
156 HWME_LOTXCALOVERWRITEMODE = 0x1B,
157 HWME_CSMACAMODE = 0x1C
158#else
160#endif // CASCODA_CA_VER >= 8212
161};
162
169
178
193
196{
205#if CASCODA_CA_VER >= 8212
206 TDME_ERR_BOD_DETECT = 0xA0,
207 TDME_ERR_DCDC_ERR = 0xB0,
208 TDME_ERR_QUEUE = 0xC0,
209#endif // CASCODA_CA_VER >= 8212
210};
211
224
225/* Tx Packet PHY Payload Data Type */
233
236{
244#if CASCODA_CA_VER <= 8211
246#endif // CASCODA_CA_VER <= 8211
247};
248
249#ifdef __cplusplus
250}
251#endif
252
256
257#endif // HWME_TDME_H
hwme_status
HWME Status Codes.
Definition hwme_tdme.h:57
tdme_payload_type
Definition hwme_tdme.h:227
tdme_test_mode
TDME Test Modes.
Definition hwme_tdme.h:214
cca_mode
CCA Mode.
Definition hwme_tdme.h:172
tdme_hw_err
Hardware Error Messages from TDME_ERROR_indication.
Definition hwme_tdme.h:181
hwme_attribute
HWME Attribute IDs.
Definition hwme_tdme.h:126
haes_mode
Hardware AES mode values.
Definition hwme_tdme.h:165
tdme_status
TDME Status Codes.
Definition hwme_tdme.h:196
hwme_wakeup_condition
Potential values for HWME_WAKEUP_indication's WakeUpCondition parameter.
Definition hwme_tdme.h:66
tdme_attribute
TDME Attribute IDs.
Definition hwme_tdme.h:236
lqi_mode
Potential values of HWME_LQIMODE.
Definition hwme_tdme.h:78
@ HWME_UNKNOWN
Unknown HWME Attribute or Parameter.
Definition hwme_tdme.h:59
@ HWME_SUCCESS
The requested Primitive has been executed successfully.
Definition hwme_tdme.h:58
@ HWME_INVALID
Invalid HWME Attribute Value or Parameter Value.
Definition hwme_tdme.h:60
@ HWME_NO_ACCESS
The requested Attribute cannot currently be accessed.
Definition hwme_tdme.h:61
@ TDME_TXD_RANDOM
Random Data, internally generated.
Definition hwme_tdme.h:228
@ TDME_TXD_COUNT
Count (Increment) Data, internally generated.
Definition hwme_tdme.h:230
@ TDME_TXD_SEQRANDOM
Sequence Number in 1st Byte and all other Data Random, internally generated.
Definition hwme_tdme.h:229
@ TDME_TXD_APPENDED
Data external and appended to TDME-TXPKT Request.
Definition hwme_tdme.h:231
@ TDME_TEST_LO_2
LO Test Mode 2 (VCO Open Loop / Initialisation, PA enabled).
Definition hwme_tdme.h:221
@ TDME_TEST_LO_3
LO Test Mode 3 (Locking Test, PA disabled).
Definition hwme_tdme.h:222
@ TDME_TEST_IDLE
Idle Test Mode.
Definition hwme_tdme.h:216
@ TDME_TEST_LO_1
LO Test Mode 1 (Tx/Rx with no Modulation on 802.15.4 Channel, PA enabled).
Definition hwme_tdme.h:220
@ TDME_TEST_OFF
All Test Modes are disabled (default).
Definition hwme_tdme.h:215
@ TDME_TEST_RX
Receive Test Mode.
Definition hwme_tdme.h:218
@ TDME_TEST_ED
Energy Detect Test Mode (Energy Sniffer).
Definition hwme_tdme.h:219
@ TDME_TEST_TX
Transmit Test Mode.
Definition hwme_tdme.h:217
@ CCAM_ED
CCA Mode: ED level exceeded.
Definition hwme_tdme.h:174
@ CCAM_EDANDCS
CCA Mode: Both ED and CS level exceeded.
Definition hwme_tdme.h:176
@ CCAM_EDORCS
CCA Mode: Either ED or CS level exceeded.
Definition hwme_tdme.h:173
@ CCAM_CS
CCA Mode: CS level exceeded.
Definition hwme_tdme.h:175
@ TDME_ERR_UNEXP_IRQ
Unexpected Interrupt (+0x0F).
Definition hwme_tdme.h:189
@ TDME_ERR_EX_STOF
Exception: Stack Overflow.
Definition hwme_tdme.h:185
@ TDME_ERR_MALLOC_FAIL
Memory Allocation Failure.
Definition hwme_tdme.h:190
@ TDME_ERR_SPI_INVALID
Invalid SPI Message.
Definition hwme_tdme.h:184
@ TDME_ERR_LO_UNLOCK
LO Unlocked.
Definition hwme_tdme.h:183
@ TDME_ERR_EX_STUF
Exception: Stack Underflow.
Definition hwme_tdme.h:186
@ TDME_ERR_SYSTEM_ERROR
System Error.
Definition hwme_tdme.h:191
@ TDME_ERR_EX_DIVBY0
Exception: Divide by 0.
Definition hwme_tdme.h:187
@ TDME_ERR_DMA_ACCESS
DMA Access Overflow/Underflow (+0x0F).
Definition hwme_tdme.h:188
@ TDME_ERR_NO_ERROR
Everything OK.
Definition hwme_tdme.h:182
@ HWME_EDVALLP
Energy Detect (ED) Value of last received Packet.
Definition hwme_tdme.h:135
@ HWME_SYSCLKOUT
System Clock Output to a specific GPIO.
Definition hwme_tdme.h:142
@ HWME_CHIPID
Product ID and Version Number.
Definition hwme_tdme.h:128
@ HWME_LQILIMIT
LQI minimal value to accept a received MAC frame.
Definition hwme_tdme.h:144
@ HWME_MACTIMER
MAC Symbol Timer Value.
Definition hwme_tdme.h:138
@ HWME_EDTHRESHOLD
Energy Detect (ED) Threshold for CCA.
Definition hwme_tdme.h:131
@ HWME_CSTHRESHOLD
Carrier Sense (CS) Threshold for CCA.
Definition hwme_tdme.h:132
@ HWME_EDVALUE
Energy Detect (ED) Value of current channel.
Definition hwme_tdme.h:133
@ HWME_FREQOFFS
Frequency Offset of last received Packet.
Definition hwme_tdme.h:137
@ HWME_CSVALLP
Carrier Sense (CS) Value of last received Packet.
Definition hwme_tdme.h:136
@ HWME_POWERCON
Power Saving Mode Control.
Definition hwme_tdme.h:127
@ HWME_CSVALUE
Carrier Sense (CS) Value of current channel.
Definition hwme_tdme.h:134
@ HWME_TXPOWER
Transmit Power Setting.
Definition hwme_tdme.h:129
@ HWME_CCAMODE
Clear Channel Assessment Mode, according to 802.15.4 Section 6.9.9.
Definition hwme_tdme.h:130
@ HWME_TEMPERATURE
Temperature Sensor Measurement Value.
Definition hwme_tdme.h:140
@ HWME_IMAGINARYINDIRECT
0=Normal Indirect behaviour, 1=Imaginary mode, don't send indirect frames
Definition hwme_tdme.h:159
@ HWME_RANDOMNUM
Random Number Value.
Definition hwme_tdme.h:139
@ HWME_LQIMODE
LQI Reporting Mode for Data Indications and PanDescriptors.
Definition hwme_tdme.h:143
@ HWME_HSKEY
Host Security Key for AES-128 Encryption or Decryption.
Definition hwme_tdme.h:141
@ HAES_MODE_ENCRYPT
Encrypt given buffer.
Definition hwme_tdme.h:166
@ HAES_MODE_DECRYPT
Decrypt given buffer.
Definition hwme_tdme.h:167
@ TDME_FCS_ERROR
Received Packet Frame Check Sequence (CRC) Error.
Definition hwme_tdme.h:202
@ TDME_UNKNOWN
Unknown TDME Value or Parameter.
Definition hwme_tdme.h:198
@ TDME_NO_ACCESS
The requested Value cannot currently be accessed.
Definition hwme_tdme.h:200
@ TDME_PHR_ERROR
Received Packet Packet Header Error.
Definition hwme_tdme.h:204
@ TDME_LO_ERROR
LO Locking Error.
Definition hwme_tdme.h:201
@ TDME_INVALID
Invalid TDME Value or Parameter Value.
Definition hwme_tdme.h:199
@ TDME_SUCCESS
The requested Primitive has been executed successfully.
Definition hwme_tdme.h:197
@ TDME_SHR_ERROR
Received Packet Synchronisation Header Error.
Definition hwme_tdme.h:203
@ HWME_WAKEUP_POWERUP
Transceiver woken up from Power Up / System Reset.
Definition hwme_tdme.h:67
@ HWME_WAKEUP_POFF_SLT
Transceiver woken up from Power-Off by Sleep Timer Time-Out.
Definition hwme_tdme.h:69
@ HWME_WAKEUP_ACTIVE_SLT
Sleep-Timer Time-Out in Active Mode.
Definition hwme_tdme.h:73
@ HWME_WAKEUP_STBY_SLT
Transceiver woken up from Standby by Sleep Timer Time-Out.
Definition hwme_tdme.h:71
@ HWME_WAKEUP_STBY_GPIO
Transceiver woken up from Standby by GPIO Activity.
Definition hwme_tdme.h:72
@ HWME_WAKEUP_WDT
Watchdog Timer Time-Out.
Definition hwme_tdme.h:68
@ HWME_WAKEUP_POFF_GPIO
Transceiver woken up from Power-Off by GPIO Activity.
Definition hwme_tdme.h:70
@ TDME_RX_CONFIG
Receiver Test Configuration.
Definition hwme_tdme.h:240
@ TDME_LO_1_CONFIG
LO Test 1 Configuration (Tx/Rx with no Modulation on 802.15.4 Channel).
Definition hwme_tdme.h:241
@ TDME_ATM_CONFIG
Analog Test Bus Configuration.
Definition hwme_tdme.h:243
@ TDME_LO_2_CONFIG
LO Test 2 Configuration (VCO Open Loop / Initialisation).
Definition hwme_tdme.h:242
@ TDME_CHANNEL
IEEE802.15.4 Channel Selection.
Definition hwme_tdme.h:237
@ TDME_TX_CONFIG
Transmit (Tx) Test Configuration.
Definition hwme_tdme.h:238
@ TDME_ED_CONFIG
Energy Detect Configuration.
Definition hwme_tdme.h:239
@ TDME_MPW2_OVWR
Definition hwme_tdme.h:245
@ HWME_LQIMODE_ED
ED (Energy Detect) is reported as LQI.
Definition hwme_tdme.h:80
@ HWME_LQIMODE_CS
CS (Carrier Sense) is reported as LQI.
Definition hwme_tdme.h:79