10.2.2 PHY-DATA.request
This function requests a message transmission to the PHY layer. This is done by means of a specific function provided by the controller descriptor:
typedef uint8_t (*pf_send_data_t)(tx_msg_t *px_msg);
The input parameter structure is the following:
typedef struct tx_msg {
uint8_t *puc_data_buf;
uint32_t ul_tx_time;
uint16_t us_data_len;
uint8_t puc_preemphasis[NUM_SUBBANDS_MAX];
uint8_t puc_tone_map[TONE_MAP_SIZE_MAX];
uint8_t uc_tx_mode;
uint8_t uc_tx_power;
enum mod_types uc_mod_type;
enum mod_schemes uc_mod_scheme;
uint8_t uc_pdc;
uint8_t uc_2_rs_blocks;
enum delimiter_types uc_delimiter_type;
} tx_msg_t;
Fields of the structure:
puc_data_buf | Pointer to data buffer |
ul_tx_time | Instant when
transmission has to start referred to the internal 1 μs PHY counter (absolute
or relative value, depending on uc_tx_mode ) |
us_data_len | Length of the data buffer in bytes. If CRC capability is enabled (ATPL360_REG_CRC_TX_RX_CAPABILITY (0x401C)), the CRC length (two bytes) is not included. |
puc_preemphasis | Preemphasis for
transmission. Same as uc_tx_power but for each sub-band
(related constants defined below) |
puc_tone_map | Tone Map (Dynamic Notching) to use in transmission (related constants defined below) |
uc_tx_mode | Transmission mode (forced, absolute/relative time mode, etc.) (related constants defined below) |
uc_tx_power | Power to transmit [0x00: Full gain; 0x01: Full gain – 3dB; up to 0x0F: Full gain – 45dB]. Value 0xFF is a special case used to apply zero-gain (transmit all zeros) |
uc_mod_type | Modulation type (related constants defined below) |
uc_mod_scheme | Modulation scheme (related constants defined below) |
uc_pdc | Phase detector counter. Not used; PDC is calculated and filled in FCH internally by the PHY layer |
uc_2_rs_blocks | Flag to indicate whether two Reed-Solomon blocks have to be used (only used in FCC band) |
uc_delimiter_type | DT field to be used in FCH (related constants defined below) |
Related constants affecting the above parameters:
/* ! \name TX Mode Bit Mask */
/* TX Mode: Forced transmission (Carrier Detect not checked before transmitting) */
#define TX_MODE_FORCED (1 << 0)
/* TX Mode: Absolute time mode */
#define TX_MODE_ABSOLUTE (0 << 1)
/* TX Mode: Relative time mode */
#define TX_MODE_RELATIVE (1 << 1)
/* TX Mode: SYNCP Continuous transmission */
#define TX_MODE_SYNCP_CONTINUOUS (1 << 2)
/* TX Mode: Symbols Continuous transmission */
#define TX_MODE_SYMBOLS_CONTINUOUS (1 << 3)
/* TX Mode: Cancel transmission */
#define TX_MODE_CANCEL (1 << 4)
/* Modulation types */
enum mod_types {
MOD_TYPE_BPSK = 0,
MOD_TYPE_QPSK = 1,
MOD_TYPE_8PSK = 2,
MOD_TYPE_QAM = 3,
MOD_TYPE_BPSK_ROBO = 4
};
/* Modulation schemes */
enum mod_schemes {
MOD_SCHEME_DIFFERENTIAL = 0,
MOD_SCHEME_COHERENT = 1
};
/* Frame Delimiter Types */
enum delimiter_types {
DT_SOF_NO_RESP = 0, /* Data frame requiring ACK */
DT_SOF_RESP = 1, /* Data frame Not requiring ACK */
DT_ACK = 2, /* Positive ACK */
DT_NACK = 3 /* Negative ACK */
};
/* Sub-bands for Cenelec-A bandplan */
#define NUM_SUBBANDS_CENELEC_A 6
/* Sub-bands for FCC bandplan */
#define NUM_SUBBANDS_FCC 24
/* Sub-bands for ARIB bandplan */
#define NUM_SUBBANDS_ARIB 18
/* Sub-bands for Cenelec-B bandplan */
#define NUM_SUBBANDS_CENELEC_B 4
/* Tone Map size for Cenelec bandplan */
#define TONE_MAP_SIZE_CENELEC 1
/* Tone Map size for FCC and ARIB bandplans */
#define TONE_MAP_SIZE_FCC_ARIB 3
/* Maximum number of tone map */
#define TONE_MAP_SIZE_MAX TONE_MAP_SIZE_FCC_ARIB
/* Maximum number of sub-bands */
#define NUM_SUBBANDS_MAX NUM_SUBBANDS_FCC
The function returns one of the following transmission result values:
/* TX Result values */
enum tx_result_values {
TX_RESULT_PROCESS = 0, /* Already in process (TX requested successfully) */
TX_RESULT_INV_LENGTH = 2, /* Invalid length error */
TX_RESULT_HIGH_TEMP_110 = 13, /* High temperature (>110ºC) error (only with PL460) */
TX_RESULT_NO_TX = 255, /* No transmission ongoing */
};