10.2.4 PHY-DATA.indication

This data indication callback executes the function set by the upper layer at the initialization of the PL360 Host Controller (see Setting Callbacks). It is called when a frame is received. The format of the function is:

typedef void (*pf_data_indication_t)(rx_msg_t *px_msg);

The information is reported in the following structure:

typedef struct rx_msg {
   uint32_t ul_rx_time;
   uint32_t ul_frame_duration; 
   uint16_t us_rssi;
   uint16_t us_data_len;
   uint8_t uc_zct_diff;
   uint8_t uc_rs_corrected_errors;
   enum mod_types uc_mod_type;
   enum mod_schemes uc_mod_scheme;
   uint32_t ul_agc_factor;
   uint16_t us_agc_fine;
   int16_t ss_agc_offset_meas;
   uint8_t uc_agc_active;
   uint8_t uc_agc_pga_value;
   int16_t ss_snr_fch;
   int16_t ss_snr_pay
   uint16_t us_payload_corrupted_carriers;
   uint16_t us_payload_noised_symbols;
   uint8_t uc_payload_snr_worst_carrier;
   uint8_t uc_payload_snr_worst_symbol;
   uint8_t uc_payload_snr_impulsive;
   uint8_t uc_payload_snr_band;
   uint8_t uc_payload_snr_background;
   uint8_t uc_lqi; 
   enum delimiter_types uc_delimiter_type;
   uint8_t uc_crc_ok;
   uint8_t puc_tone_map[TONE_MAP_SIZE_MAX];
   uint8_t puc_carrier_snr[PROTOCOL_CARRIERS_MAX];
   uint8_t *puc_data_buf;
} rx_msg_t;

Fields of the structure:

ul_rx_timeInstant when frame was received (end of frame), referred to the internal 1µs PHY counter
ul_frame_durationFrame duration in µs (Preamble + FCH + Payload)
us_rssiRSSI in dBµV
us_data_lenLength of received frame in bytes. If CRC capability is enabled (ATPL360_REG_CRC_TX_RX_CAPABILITY (0x401C)), the CRC length (two bytes) is not included
uc_zct_diffPhase difference with transmitting node [0-5]. Derived from PDC field in FCH and Zero-Crossing time
uc_rs_corrected_errorsErrors corrected by Reed-Solomon decoder
uc_mod_typeModulation type of the received frame (related constants defined in PHY-DATA.request)
uc_mod_schemeModulation scheme of the received frame (related constants defined in PHY-DATA.request)
ul_agc_factorGlobal amplifying factor of the main branch (21 bits)
us_agc_fineFactor that multiplies the digital input signal (13 bits)
ss_agc_offset_measDC offset after the ADC that will be removed in case the DC Blocker is enabled (10 bits)
uc_agc_activeFlag to indicate if AGC is active
uc_agc_pga_valueGain value applied to the PGA (3 bits)
ss_snr_fchSNR of FCH symbols in dB with sQ13.2 format (0x0000: 0dB; 0x0001: 0.25dB; 0xFFFF: -0.25dB)
ss_snr_paySNR of payload symbols in dB with sQ13.2 format
us_payload_corrupted_carriersNumber of corrupted carriers in payload due to narrow/broad-band noise
us_payload_noised_symbolsNumber of corrupted symbols in payload due to impulsive noise
uc_payload_snr_worst_carrierSNR of the worst carrier within payload symbols in dB with sQ5.2 format (0x00: 0dB; 0x01: 0.25dB; 0xFF: -0.25dB)
uc_payload_snr_worst_symbolSNR of the worst payload symbol in dB with sQ5.2 format
uc_payload_snr_impulsiveSNR of payload symbols corrupted by impulsive noise in dB with sQ5.2 format
uc_payload_snr_bandSNR of carriers corrupted by narrow/broad-band noise within payload symbols in dB with sQ5.2 format
uc_payload_snr_backgroundSNR of payload symbols without taking into account corrupted carriers/symbols in dB with sQ5.2 format
uc_lqiLink Quality Indicator. SNR of payload symbols in dB with uQ6.2 format and -10 dB offset (0x00: -10 dB; 0x01: -9.75 dB; 0xFF: 53.75 dB)
uc_delimiter_typeDT field coming in FCH (related constants defined in PHY-DATA.request)
uc_crc_okCRC verification result [0x01: OK; 0x00: BAD; 0xFE: unexpected error; 0xFF: CRC capability disabled]. See ATPL360_REG_CRC_TX_RX_CAPABILITY (0x401C)
puc_tone_mapTone Map (Dynamic Notching) in received frame (related constants defined in PHY-DATA.request)
puc_carrier_snrArray containing the SNR of each carrier within payload symbols in dB with -10 dB offset (0x00: -10 dB; 0x01: -9 dB; 0xFF: 245 dB) (related constants defined below)
puc_data_bufPointer to data buffer containing the received frame

Related constants affecting the above parameters:

/* Carriers for Cenelec-A bandplan */
#define NUM_CARRIERS_CENELEC_A                     36
/* Carriers for FCC bandplan */
#define NUM_CARRIERS_FCC                           72
/* Carriers for ARIB bandplan */
#define NUM_CARRIERS_ARIB                          54
/* Carriers for Cenelec-B bandplan */
#define NUM_CARRIERS_CENELEC_B                     16

/* ! Maximum number of protocol carriers */
#define PROTOCOL_CARRIERS_MAX                      NUM_CARRIERS_FCC