Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Xcvr
Data Structures | |
| struct | xcvr_currConfig_tag |
| Current configuration of the radio. More... | |
| struct | _xcvr_rx_chf_coeffs |
| XCVR RX_DIG channel filter coefficient storage Storage of the coefficients varies from 6 bits to 10 bits so all use int16_t for storage. More... | |
| struct | _xcvr_masked_init_32 |
| XCVR masked init type for 32 bit registers Initialization uses the mask to clear selected fields of the register and then OR's in the init value. All init values must be in their proper field position. More... | |
| struct | _xcvr_common_config |
| XCVR common configure structure. More... | |
| struct | _xcvr_mode_config |
| XCVR mode specific configure structure (varies by radio mode) More... | |
| struct | _xcvr_mode_datarate_config |
| XCVR modeXdatarate specific configure structure (varies by radio mode AND data rate) This structure is used to store all of the XCVR settings which are dependent upon both radio mode and data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate. More... | |
| struct | _xcvr_datarate_config |
| XCVR datarate specific configure structure (varies by data rate) This structure is used to store all of the XCVR settings which are dependent upon data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate. More... | |
Files | |
| file | dbg_ram_capture.h |
| file | fsl_xcvr.h |
| file | fsl_xcvr_trim.h |
| file | ifr_radio.h |
Typedefs | |
| typedef enum _xcvrStatus | xcvrStatus_t |
| Error codes for the XCVR driver. | |
| typedef enum _healthStatus | healthStatus_t |
| Health status returned from PHY upon status check function return. | |
| typedef enum _ext_clock_config | ext_clock_config_t |
| Health status returned from PHY upon status check function return. | |
| typedef enum _radio_mode | radio_mode_t |
| Radio operating mode setting types. | |
| typedef enum _link_layer | link_layer_t |
| Link layer types. | |
| typedef enum _data_rate | data_rate_t |
| Data rate selections. | |
| typedef enum _FAD_LPPS_CTRL | FAD_LPPS_CTRL_T |
| Control settings for Fast Antenna Diversity. | |
| typedef enum _XCVR_PANIC_ID | XCVR_PANIC_ID_T |
| XCVR XCVR Panic codes for indicating panic reason. | |
| typedef enum _XCVR_INIT_MODE_CHG | XCVR_INIT_MODE_CHG_T |
| Initialization or mode change selection for config routine. | |
| typedef struct xcvr_currConfig_tag | xcvr_currConfig_t |
| Current configuration of the radio. | |
| typedef struct _xcvr_rx_chf_coeffs | xcvr_rx_chf_coeffs_t |
| XCVR RX_DIG channel filter coefficient storage Storage of the coefficients varies from 6 bits to 10 bits so all use int16_t for storage. | |
| typedef struct _xcvr_masked_init_32 | xcvr_masked_init_32_t |
| XCVR masked init type for 32 bit registers Initialization uses the mask to clear selected fields of the register and then OR's in the init value. All init values must be in their proper field position. | |
| typedef struct _xcvr_common_config | xcvr_common_config_t |
| XCVR common configure structure. | |
| typedef struct _xcvr_mode_config | xcvr_mode_config_t |
| XCVR mode specific configure structure (varies by radio mode) | |
| typedef struct _xcvr_mode_datarate_config | xcvr_mode_datarate_config_t |
| XCVR modeXdatarate specific configure structure (varies by radio mode AND data rate) This structure is used to store all of the XCVR settings which are dependent upon both radio mode and data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate. | |
| typedef struct _xcvr_datarate_config | xcvr_datarate_config_t |
| XCVR datarate specific configure structure (varies by data rate) This structure is used to store all of the XCVR settings which are dependent upon data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate. | |
| typedef void(* | panic_fptr )(uint32_t panic_id, uint32_t location, uint32_t extra1, uint32_t extra2) |
| LPUART callback function type. | |
Enumerations | |
| enum | _xcvrStatus |
Error codes for the XCVR driver. More... | |
| enum | _healthStatus |
Health status returned from PHY upon status check function return. More... | |
| enum | _ext_clock_config |
Health status returned from PHY upon status check function return. More... | |
| enum | _radio_mode |
Radio operating mode setting types. More... | |
| enum | _link_layer |
Link layer types. More... | |
| enum | _data_rate |
Data rate selections. More... | |
| enum | _FAD_LPPS_CTRL |
Control settings for Fast Antenna Diversity. More... | |
| enum | _XCVR_PANIC_ID |
XCVR XCVR Panic codes for indicating panic reason. More... | |
| enum | _XCVR_INIT_MODE_CHG |
Initialization or mode change selection for config routine. More... | |
Functions | |
| void | dbg_ram_init (void) |
| This function prepares for sample capture to packet RAM. | |
| void | dbg_ram_release (void) |
| This function performs any state restoration at the completion of PKT RAM capture. | |
| dbgRamStatus_t | dbg_ram_start_capture (uint8_t dbg_page, dbgRamStartTriggerType start_trig, dbgRamStopTriggerType stop_trig) |
| This function initiates the capture of transceiver data to the transceiver packet RAM. | |
| dbgRamStatus_t | dbg_ram_wait_for_complete (void) |
| This function performs a blocking wait for completion of the capture of transceiver data to the transceiver packet RAM. | |
| dbgRamStatus_t | dbg_ram_poll_capture_status (void) |
| This function polls the state of the capture of transceiver data to the transceiver packet RAM. | |
| dbgRamStatus_t | dbg_ram_postproc_capture (uint8_t dbg_page, uint16_t buffer_sz_bytes, void *result_buffer) |
| This function processes the captured data into a usable order and copies from packet RAM to normal RAM. | |
| dbgRamStatus_t | dbg_ram_capture (uint8_t dbg_page, uint16_t buffer_sz_bytes, void *result_buffer) |
| This function captures transceiver data to the transceiver packet RAM. | |
| void | rx_dc_sample_average (int16_t *i_avg, int16_t *q_avg) |
| This function calculates the average (DC value) based on a smaller set of digital samples of I and Q. | |
| void | rx_dc_sample_average_long (int16_t *i_avg, int16_t *q_avg) |
| This function calculates the average (DC value) based on a larger set of digital samples of I and Q. | |
| uint8_t | rx_bba_dcoc_dac_trim_shortIQ (void) |
| This function performs a trim of the BBA DCOC DAC on the DUT. | |
| void | XcvrCalDelay (uint32_t time) |
| Temporary delay function. | |
| void | rx_dc_est_average (int16_t *i_avg, int16_t *q_avg, uint16_t SampleNumber) |
| uint8_t | rx_bba_dcoc_dac_trim_DCest (void) |
| This function performs a trim of the BBA DCOC DAC on the DUT. | |
| void | DCOC_DAC_INIT_Cal (uint8_t standalone_operation) |
| uint32_t | read_resource_ifr (uint32_t read_addr) |
| Reads a location in block 1 IFR for use by the radio. | |
| uint32_t | read_resource (uint16_t resource_id) |
| Reads a location in a simulated data array to support IFR handler testing. | |
| void | handle_ifr (IFR_SW_TRIM_TBL_ENTRY_T *sw_trim_tbl, uint16_t num_entries) |
| Main IFR handler function called by XCVR driver software to process trim table. | |
| uint32_t | handle_ifr_die_id (void) |
| Handler function to read die_id from IFR locations.. | |
| uint32_t | handle_ifr_die_kw_type (void) |
| Handler function to read KW chip version from IFR locations.. | |
| void | dump_ifr (uint32_t *dump_tbl, uint8_t num_entries) |
| Debug function to dump the IFR contents to a RAM array. | |
Variables | |
| const xcvr_datarate_config_t | xcvr_1mbps_config |
| XCVR 1Mbps DATA RATE specific configure structure. | |
| const xcvr_datarate_config_t | xcvr_500kbps_config |
| XCVR 500K bps DATA RATE specific configure structure. | |
| const xcvr_datarate_config_t | xcvr_250kbps_config |
| XCVR 250K bps DATA RATE specific configure structure. | |
| const xcvr_datarate_config_t | xcvr_802_15_4_500kbps_config |
| XCVR 500K bps DATA RATE specific configure structure. | |
XCVR functional Operation | |
| xcvrStatus_t | XCVR_Init (radio_mode_t radio_mode, data_rate_t data_rate) |
| Initializes an XCVR instance. | |
| void | XCVR_Deinit (void) |
| Deinitializes an XCVR instance. | |
| xcvrStatus_t | XCVR_GetDefaultConfig (radio_mode_t radio_mode, data_rate_t data_rate, const xcvr_common_config_t **com_config, const xcvr_mode_config_t **mode_config, const xcvr_mode_datarate_config_t **mode_datarate_config, const xcvr_datarate_config_t **datarate_config) |
| Initializes XCVR configure structure. | |
| xcvrStatus_t | XCVR_Configure (const xcvr_common_config_t *com_config, const xcvr_mode_config_t *mode_config, const xcvr_mode_datarate_config_t *mode_datarate_config, const xcvr_datarate_config_t *datarate_config, int16_t tempDegC, XCVR_INIT_MODE_CHG_T first_init) |
| Initializes an XCVR instance. | |
| void | XCVR_Reset (void) |
| Set XCVR register to reset value. | |
| xcvrStatus_t | XCVR_ChangeMode (radio_mode_t new_radio_mode, data_rate_t new_data_rate) |
| Change the operating mode of the radio. | |
| void | XCVR_EnaNBRSSIMeas (uint8_t IIRnbEnable) |
| Enable Narrowband RSSI measurement. | |
| xcvrStatus_t | XCVR_OverrideFrequency (uint32_t freq, uint32_t refOsc) |
| Set an arbitrary frequency for RX and TX for the radio. | |
| void | XCVR_RegisterPanicCb (panic_fptr fptr) |
| Register a callback from upper layers. | |
| healthStatus_t | XCVR_HealthCheck (void) |
| Read the health status of the XCVR to detect errors. | |
| void | XCVR_FadLppsControl (FAD_LPPS_CTRL_T control) |
| Control FAD and LPPS features. | |
| xcvrStatus_t | XCVR_SetIRQMapping (radio_mode_t irq0_mapping, radio_mode_t irq1_mapping) |
| Change the mapping of the radio IRQs. | |
| void | XCVR_SetBSM_NTW_Address (uint32_t bsm_ntw_address) |
| Sets the network address used by the PHY during BLE Bit Streaming Mode. | |
| uint32_t | XCVR_GetBSM_NTW_Address (void) |
| Reads the currently programmed network address used by the PHY during BLE Bit Streaming Mode. | |
| link_layer_t | XCVR_GetIRQMapping (uint8_t int_num) |
| Get the mapping of the one of the radio IRQs. | |
| xcvrStatus_t | XCVR_GetCurrentConfig (xcvr_currConfig_t *curr_config) |
| Get the current configuration of the XCVR. | |
| xcvrStatus_t | XCVR_SetXtalTrim (uint8_t xtalTrim) |
| Controls setting the XTAL trim value.. | |
| uint8_t | XCVR_GetXtalTrim (void) |
| Controls getting the XTAL trim value.. | |
| xcvrStatus_t | XCVR_SetRssiAdjustment (int8_t adj) |
| Controls setting the RSSI adjustment.. | |
| int8_t | XCVR_GetRssiAdjustment (void) |
| Controls getting the RSSI adjustment.. | |
| xcvrStatus_t | XCVR_OverrideChannel (uint8_t channel, uint8_t useMappedChannel) |
| Controls setting the PLL to a particular channel. | |
| uint32_t | XCVR_GetFreq (void) |
| Reads the current frequency for RX and TX for the radio. | |
| void | XCVR_ForceRxWu (void) |
| Force receiver warmup. | |
| void | XCVR_ForceRxWd (void) |
| Force receiver warmdown. | |
| void | XCVR_ForceTxWu (void) |
| Force transmitter warmup. | |
| void | XCVR_ForceTxWd (void) |
| Force transmitter warmdown. | |
| xcvrStatus_t | XCVR_DftTxPatternReg (uint16_t channel_num, radio_mode_t radio_mode, data_rate_t data_rate, uint32_t tx_pattern) |
| Starts transmit with a TX pattern register data sequence. | |
| xcvrStatus_t | XCVR_DftTxLfsrReg (uint16_t channel_num, radio_mode_t radio_mode, data_rate_t data_rate, uint8_t lfsr_length) |
| Starts transmit with a TX LFSR register data sequence. | |
| void | XCVR_DftTxOff (void) |
| Controls clearing all TX DFT settings. | |
| xcvrStatus_t | XCVR_ForcePAPower (uint8_t pa_power) |
| Controls setting the PA power level. | |
| xcvrStatus_t | XCVR_DftTxCW (uint16_t rf_channel_freq, uint8_t protocol) |
| Starts CW TX. | |
| xcvrStatus_t | XCVR_CoexistenceInit (void) |
| xcvrStatus_t | XCVR_CoexistenceSetPriority (XCVR_COEX_PRIORITY_T rxPriority, XCVR_COEX_PRIORITY_T txPriority) |
| xcvrStatus_t | XCVR_CoexistenceSaveRestoreTimings (uint8_t saveTimings) |
Typedef Documentation
| typedef enum _data_rate data_rate_t |
Data rate selections.
| typedef enum _ext_clock_config ext_clock_config_t |
Health status returned from PHY upon status check function return.
| typedef enum _FAD_LPPS_CTRL FAD_LPPS_CTRL_T |
Control settings for Fast Antenna Diversity.
| typedef enum _healthStatus healthStatus_t |
Health status returned from PHY upon status check function return.
| typedef enum _link_layer link_layer_t |
Link layer types.
| typedef void(* panic_fptr)(uint32_t panic_id, uint32_t location, uint32_t extra1, uint32_t extra2) |
LPUART callback function type.
The panic callback function is defined by system if system need to be informed of XCVR fatal errors. refer to XCVR_RegisterPanicCb
Definition at line 808 of file fsl_xcvr.h.
| typedef enum _radio_mode radio_mode_t |
Radio operating mode setting types.
| typedef struct _xcvr_common_config xcvr_common_config_t |
XCVR common configure structure.
| typedef struct xcvr_currConfig_tag xcvr_currConfig_t |
Current configuration of the radio.
| typedef struct _xcvr_datarate_config xcvr_datarate_config_t |
XCVR datarate specific configure structure (varies by data rate) This structure is used to store all of the XCVR settings which are dependent upon data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate.
| typedef enum _XCVR_INIT_MODE_CHG XCVR_INIT_MODE_CHG_T |
Initialization or mode change selection for config routine.
| typedef struct _xcvr_masked_init_32 xcvr_masked_init_32_t |
XCVR masked init type for 32 bit registers Initialization uses the mask to clear selected fields of the register and then OR's in the init value. All init values must be in their proper field position.
| typedef struct _xcvr_mode_config xcvr_mode_config_t |
XCVR mode specific configure structure (varies by radio mode)
| typedef struct _xcvr_mode_datarate_config xcvr_mode_datarate_config_t |
XCVR modeXdatarate specific configure structure (varies by radio mode AND data rate) This structure is used to store all of the XCVR settings which are dependent upon both radio mode and data rate. It is used as an overlay on top of the xcvr_mode_config_t structure to supply definitions which are either not in that table or which must be overridden for data rate.
| typedef enum _XCVR_PANIC_ID XCVR_PANIC_ID_T |
XCVR XCVR Panic codes for indicating panic reason.
| typedef struct _xcvr_rx_chf_coeffs xcvr_rx_chf_coeffs_t |
XCVR RX_DIG channel filter coefficient storage Storage of the coefficients varies from 6 bits to 10 bits so all use int16_t for storage.
| typedef enum _xcvrStatus xcvrStatus_t |
Error codes for the XCVR driver.
Enumeration Type Documentation
| enum _data_rate |
Data rate selections.
Definition at line 445 of file fsl_xcvr.h.
| enum _ext_clock_config |
Health status returned from PHY upon status check function return.
Definition at line 407 of file fsl_xcvr.h.
| enum _FAD_LPPS_CTRL |
Control settings for Fast Antenna Diversity.
Definition at line 457 of file fsl_xcvr.h.
| enum _healthStatus |
Health status returned from PHY upon status check function return.
Definition at line 397 of file fsl_xcvr.h.
| enum _link_layer |
Link layer types.
Definition at line 435 of file fsl_xcvr.h.
| enum _radio_mode |
Radio operating mode setting types.
Definition at line 414 of file fsl_xcvr.h.
| enum _XCVR_INIT_MODE_CHG |
Initialization or mode change selection for config routine.
Definition at line 472 of file fsl_xcvr.h.
| enum _XCVR_PANIC_ID |
XCVR XCVR Panic codes for indicating panic reason.
Definition at line 465 of file fsl_xcvr.h.
| enum _xcvrStatus |
Error codes for the XCVR driver.
Definition at line 388 of file fsl_xcvr.h.
Function Documentation
| dbgRamStatus_t dbg_ram_capture | ( | uint8_t | dbg_page, |
| uint16_t | buffer_sz_bytes, | ||
| void * | result_buffer | ||
| ) |
This function captures transceiver data to the transceiver packet RAM.
*********************************************************************************
- Parameters:
-
[in] dbg_page - The page selector (DBG_PAGE). [in] buffer_sz_bytes - The size of the output buffer (in bytes) [in] result_buffer - The pointer to the output buffer of a size large enough for the samples.
- Returns:
- None.
The capture to packet RAM always captures a full PKT_RAM worth of samples. The samples will be copied to the buffer pointed to by result_buffer parameter until buffer_sz_bytes worth of data have been copied. Data will be copied NOTE: This routine has a slight hazard of getting stuck waiting for debug RAM to fill up when RX has not been enabled or RX ends before the RAM fills up (such as when capturing packet data ). It is intended to be used with manually triggered RX where RX data will continue as long as needed.
| void dbg_ram_init | ( | void | ) |
This function prepares for sample capture to packet RAM.
*********************************************************************************
- Returns:
- None.
This routine assumes that some other functions in the calling routine both set the channel and force RX warmup before calling dbg_ram_capture().
| dbgRamStatus_t dbg_ram_poll_capture_status | ( | void | ) |
This function polls the state of the capture of transceiver data to the transceiver packet RAM.
*********************************************************************************
- Returns:
- Status of the request, DBG_RAM_SUCCESS if capture is complete, DBG_RAM_CAPTURE_NOT_COMPLETE if not complete.
| dbgRamStatus_t dbg_ram_postproc_capture | ( | uint8_t | dbg_page, |
| uint16_t | buffer_sz_bytes, | ||
| void * | result_buffer | ||
| ) |
This function processes the captured data into a usable order and copies from packet RAM to normal RAM.
*********************************************************************************
- Parameters:
-
[in] dbg_page - The page selector (DBG_PAGE). [in] buffer_sz_bytes - The size of the output buffer (in bytes) [in] result_buffer - The pointer to the output buffer of a size large enough for the samples.
- Returns:
- None.
Data is copied from packet RAM in bytes to ensure no access problems. Data is unpacked from packet RAM (either sequentially captured or simultaneously captured) into a linear RAM buffer in system RAM. If a start trigger is enabled then the first buffer_sz_bytes that are captured are copied out. If a stop trigger is enabled then the last buffer_sz_bytes that are captured are copied out.
| void dbg_ram_release | ( | void | ) |
This function performs any state restoration at the completion of PKT RAM capture.
*********************************************************************************
Any clocks enabled to the packet RAM capture circuitry are disabled.
| dbgRamStatus_t dbg_ram_start_capture | ( | uint8_t | dbg_page, |
| dbgRamStartTriggerType | start_trig, | ||
| dbgRamStopTriggerType | stop_trig | ||
| ) |
This function initiates the capture of transceiver data to the transceiver packet RAM.
*********************************************************************************
- Parameters:
-
[in] dbg_page - The page selector (DBG_PAGE). [in] dbg_start_trigger - The trigger to start acquisition (must be "no trigger" if a stop trigger is enabled). [in] dbg_stop_trigger - The trigger to stop acquisition (must be "no trigger" if a start trigger is enabled).
- Returns:
- Status of the request.
This function starts the process of capturing data to the packet RAM. Depending upon the start and stop trigger settings, the actual capture process can take an indeterminate amount of time. Other APIs are provided to perform a blocking wait for completion or allow polling for completion of the capture. After any capture has completed, a separate routine must be called to postprocess the capture and copy all data out of the packet RAM into a normal RAM buffer.
| dbgRamStatus_t dbg_ram_wait_for_complete | ( | void | ) |
This function performs a blocking wait for completion of the capture of transceiver data to the transceiver packet RAM.
*********************************************************************************
- Returns:
- Status of the request, DBG_RAM_SUCCESS if capture is complete.
This function performs a wait loop for capture completion and may take an indeterminate amount of time for some capture trigger types.
| void DCOC_DAC_INIT_Cal | ( | uint8_t | standalone_operation ) |
********************************************************************************* DCOC_DAC_INIT_Cal : slope sign seek depending on measure's sign
Definition at line 761 of file fsl_xcvr_trim.c.
| void dump_ifr | ( | uint32_t * | dump_tbl, |
| uint8_t | num_entries | ||
| ) |
Debug function to dump the IFR contents to a RAM array.
This function handles reading data from IFR and storing to a RAM array for debug.
- Parameters:
-
dump_tbl pointer to the table used to store IFR entry values. num_entries the number of entries that can be stored in the dump table.
Debug function to dump the IFR contents to a RAM array.
*********************************************************************************
- Parameters:
-
dump_tbl pointer to the table to hold the dumped IFR values num_entries the number of entries to dump
- Remarks:
- Starts at the first address in IFR and dumps sequential entries.
Definition at line 512 of file ifr_radio.c.
| void handle_ifr | ( | IFR_SW_TRIM_TBL_ENTRY_T * | sw_trim_tbl, |
| uint16_t | num_entries | ||
| ) |
Main IFR handler function called by XCVR driver software to process trim table.
This function handles reading data from IFR and either loading to registers or storing to a SW trim values table.
- Parameters:
-
sw_trim_tbl pointer to the table used to store software trim values. num_entries the number of entries that can be stored in the SW trim table.
Main IFR handler function called by XCVR driver software to process trim table.
*********************************************************************************
- Parameters:
-
sw_trim_tbl pointer to the software trim table to hold SW trim values num_entries the number of entries in the SW trim table
- Remarks:
- Uses a IFR v2 formatted default array if the IFR is blank or corrupted. Stores SW trim values to an array passed into this function.
Definition at line 370 of file ifr_radio.c.
| uint32_t handle_ifr_die_id | ( | void | ) |
Handler function to read die_id from IFR locations..
This function handles reading die ID value for debug and testing usage.
- Returns:
- the value of the die ID field.
Definition at line 478 of file ifr_radio.c.
| uint32_t handle_ifr_die_kw_type | ( | void | ) |
Handler function to read KW chip version from IFR locations..
This function handles reading KW chip version for debug and testing usage.
- Returns:
- the value of the KW version field.
Definition at line 490 of file ifr_radio.c.
| uint32_t read_resource | ( | uint16_t | resource_id ) |
Reads a location in a simulated data array to support IFR handler testing.
This function handles reading data from a const table for testing the trim loading functions.
- Parameters:
-
read_addr the address in the IFR to be read.
| uint32_t read_resource_ifr | ( | uint32_t | read_addr ) |
Reads a location in block 1 IFR for use by the radio.
This function handles reading IFR data from flash memory for trim loading.
- Parameters:
-
read_addr the address in the IFR to be read.
Read command for reading from IFR.
********************************************************************************* This function handles reading IFR data from flash memory for trim loading.
- Parameters:
-
read_addr the address in the IFR to be read.
This function wraps both the Gen2 read_resource command and the Gen2.1 and Gen3 read_index
*********************************************************************************
- Parameters:
-
read_addr flash address
- Returns:
- packed data containing radio trims only
Definition at line 239 of file ifr_radio.c.
| uint8_t rx_bba_dcoc_dac_trim_DCest | ( | void | ) |
This function performs a trim of the BBA DCOC DAC on the DUT.
*********************************************************************************
- Returns:
- status - 1 if passed, 0 if failed.
Requires the RX to be warmed up before this function is called.
Definition at line 563 of file fsl_xcvr_trim.c.
| uint8_t rx_bba_dcoc_dac_trim_shortIQ | ( | void | ) |
This function performs a trim of the BBA DCOC DAC on the DUT.
*********************************************************************************
- Returns:
- status - 1 if passed, 0 if failed.
Requires the RX to be warmed up before this function is called.
Definition at line 103 of file fsl_xcvr_trim.c.
| void rx_dc_est_average | ( | int16_t * | i_avg, |
| int16_t * | q_avg, | ||
| uint16_t | SampleNumber | ||
| ) |
********************************************************************************* rx_dc_est_average : Get DC EST values and return the Average
Definition at line 513 of file fsl_xcvr_trim.c.
| void rx_dc_sample_average | ( | int16_t * | i_avg, |
| int16_t * | q_avg | ||
| ) |
This function calculates the average (DC value) based on a smaller set of digital samples of I and Q.
*********************************************************************************
- Parameters:
-
[in] i_avg - pointer to the location for storing the calculated average for I channel samples. [in] q_avg - pointer to the location for storing the calculated average for Q channel samples.
Definition at line 371 of file fsl_xcvr_trim.c.
| void rx_dc_sample_average_long | ( | int16_t * | i_avg, |
| int16_t * | q_avg | ||
| ) |
This function calculates the average (DC value) based on a larger set of digital samples of I and Q.
*********************************************************************************
- Parameters:
-
[in] i_avg - pointer to the location for storing the calculated average for I channel samples. [in] q_avg - pointer to the location for storing the calculated average for Q channel samples.
Definition at line 443 of file fsl_xcvr_trim.c.
| xcvrStatus_t XCVR_ChangeMode | ( | radio_mode_t | new_radio_mode, |
| data_rate_t | new_data_rate | ||
| ) |
Change the operating mode of the radio.
This function changes the XCVR to a new radio operating mode.
- Parameters:
-
new_radio_mode The radio mode for which the XCVR should be configured. new_data_rate The data rate for which the XCVR should be configured. Only matters when GFSK/MSK radio_mode is selected.
- Returns:
- status of the mode change.
Definition at line 1098 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_Configure | ( | const xcvr_common_config_t * | com_config, |
| const xcvr_mode_config_t * | mode_config, | ||
| const xcvr_mode_datarate_config_t * | mode_datarate_config, | ||
| const xcvr_datarate_config_t * | datarate_config, | ||
| int16_t | tempDegC, | ||
| XCVR_INIT_MODE_CHG_T | first_init | ||
| ) |
Initializes an XCVR instance.
This function initializes the XCVR module with user-defined settings.
- Parameters:
-
com_config Pointer to the common configuration settings structure. mode_config Pointer to the mode specific configuration settings structure. mode_datarate_config Pointer to a pointer to the modeXdata rate specific configuration settings structure. datarate_config Pointer to a pointer to the data rate specific configuration settings structure. tempDegC temperature of the die in degrees C. ext_clk indicates the external clock setting, 32MHz or 26MHz. first_init indicates whether the call is to initialize (== 1) or the call is to perform a mode change (== 0)
- Returns:
- 0 succeed, others failed
Definition at line 522 of file fsl_xcvr.c.
| void XCVR_Deinit | ( | void | ) |
Deinitializes an XCVR instance.
This function gate the XCVR module clock and set all register value to reset value.
Definition at line 411 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_DftTxCW | ( | uint16_t | rf_channel_freq, |
| uint8_t | protocol | ||
| ) |
Starts CW TX.
This function starts transmitting CW (no modulation).
- Parameters:
-
rf_channel_freq - the RF channel to transmit on. Valid values are integer values from 2360 to 2487MHz, inclusive. protocol - the protocol setting to use, valid settings are 6 (GFSK) and 7 (FSK).
- Returns:
- The status of the CW transmit.
Definition at line 1524 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_DftTxLfsrReg | ( | uint16_t | channel_num, |
| radio_mode_t | radio_mode, | ||
| data_rate_t | data_rate, | ||
| uint8_t | lfsr_length | ||
| ) |
Starts transmit with a TX LFSR register data sequence.
This function starts transmitting using the DFT LFSR register mode.
- Parameters:
-
channel_num - the protocol specific channel to transmit on. Valid values are defined in the CHANNEL_NUM register documentation. radio_mode The radio mode for which the XCVR should be configured. data_rate The data rate for which the XCVR should be configured. Only matters when GFSK/MSK radio_mode is selected. lfsr_length - the length of the LFSR sequence to use.
- Returns:
- The status of the LFSR reg transmit.
- Note:
- The XCVR_DftTxOff() function must be called to turn off TX and revert all settings. This routine calls XCVR_ChangeMode() with the desired radio mode and data rate.
Definition at line 1631 of file fsl_xcvr.c.
| void XCVR_DftTxOff | ( | void | ) |
Controls clearing all TX DFT settings.
This function reverts all TX DFT settings from the test modes to normal operating mode.
Definition at line 1720 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_DftTxPatternReg | ( | uint16_t | channel_num, |
| radio_mode_t | radio_mode, | ||
| data_rate_t | data_rate, | ||
| uint32_t | tx_pattern | ||
| ) |
Starts transmit with a TX pattern register data sequence.
This function starts transmitting using the DFT pattern register mode.
- Parameters:
-
channel_num - the protocol specific channel to transmit on. Valid values are defined in the CHANNEL_NUM register documentation. radio_mode The radio mode for which the XCVR should be configured. data_rate The data rate for which the XCVR should be configured. Only matters when GFSK/MSK radio_mode is selected. tx_pattern - the data pattern to transmit on.
- Returns:
- The status of the pattern reg transmit.
- Note:
- The XCVR_DftTxOff() function must be called to turn off TX and revert all settings. This routine calls XCVR_ChangeMode() with the desired radio mode and data rate.
Definition at line 1558 of file fsl_xcvr.c.
| void XCVR_EnaNBRSSIMeas | ( | uint8_t | IIRnbEnable ) |
Enable Narrowband RSSI measurement.
This function enables the narrowband RSSI measurement
- Parameters:
-
IIRnbEnable true causes the NB RSSI to be enabled, false disabled.
Definition at line 1121 of file fsl_xcvr.c.
| void XCVR_FadLppsControl | ( | FAD_LPPS_CTRL_T | control ) |
Control FAD and LPPS features.
This function controls the Fast Antenna Diversity (FAD) and Low Power Preamble Search.
- Parameters:
-
fptr control the FAD and LPPS settings.
Definition at line 1229 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_ForcePAPower | ( | uint8_t | pa_power ) |
Controls setting the PA power level.
This function enables setting the PA power level to a specific setting, overriding any link layer settings.
- Parameters:
-
pa_power - the power level to set. Valid values are 0, 1, and even values from 2 to 0x3E, inclusive.
- Returns:
- The status of the PA power over-ride.
Definition at line 1732 of file fsl_xcvr.c.
| void XCVR_ForceRxWd | ( | void | ) |
Force receiver warmdown.
This function forces the initiation of a receiver warmdown sequence.
Definition at line 1509 of file fsl_xcvr.c.
| void XCVR_ForceRxWu | ( | void | ) |
Force receiver warmup.
This function forces the initiation of a receiver warmup sequence.
Definition at line 1504 of file fsl_xcvr.c.
| void XCVR_ForceTxWd | ( | void | ) |
Force transmitter warmdown.
This function forces the initiation of a transmit warmdown sequence.
Definition at line 1519 of file fsl_xcvr.c.
| void XCVR_ForceTxWu | ( | void | ) |
Force transmitter warmup.
This function forces the initiation of a transmit warmup sequence.
Definition at line 1514 of file fsl_xcvr.c.
| uint32_t XCVR_GetBSM_NTW_Address | ( | void | ) |
Reads the currently programmed network address used by the PHY during BLE Bit Streaming Mode.
This function reads the register in the PHY which contains the network address used during BSM.
- Returns:
- bsm_ntw_address the address to be used during BSM. @ note This routine does NOT enable BSM.
Definition at line 1271 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_GetCurrentConfig | ( | xcvr_currConfig_t * | curr_config ) |
Get the current configuration of the XCVR.
This function fetches the current configuration (radio mode and radio data rate) of the XCVR to allow LL to properly config data rates, etc
- Parameters:
-
curr_config pointer to a structure to be updated with the current mode and data rate.
- Returns:
- the status of the request, success or invalid parameter (null pointer).
- Note:
- This API will return meaningless results if called before the radio is initialized...
Definition at line 1314 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_GetDefaultConfig | ( | radio_mode_t | radio_mode, |
| data_rate_t | data_rate, | ||
| const xcvr_common_config_t ** | com_config, | ||
| const xcvr_mode_config_t ** | mode_config, | ||
| const xcvr_mode_datarate_config_t ** | mode_datarate_config, | ||
| const xcvr_datarate_config_t ** | datarate_config | ||
| ) |
Initializes XCVR configure structure.
This function updates pointers to the XCVR configure structures with default values. The configurations are divided into a common structure, a set of radio mode specific structures (one per radio_mode), a set of mode&datarate specific structures (for each mode at each datarate), and a set of data rate specific structures. The pointers provided by this routine point to const structures which can be copied to variable structures if changes to settings are required.
- Parameters:
-
radio_mode [in] The radio mode for which the configuration structures are requested. data_rate [in] The data rate for which the configuration structures are requested. com_config [in,out] Pointer to a pointer to the common configuration settings structure. mode_config [in,out] Pointer to a pointer to the mode specific configuration settings structure. mode_datarate_config [in,out] Pointer to a pointer to the modeXdata rate specific configuration settings structure. datarate_config [in,out] Pointer to a pointer to the data rate specific configuration settings structure.
- Returns:
- 0 success, others failure
- See also:
- XCVR_Configure
Definition at line 422 of file fsl_xcvr.c.
| uint32_t XCVR_GetFreq | ( | void | ) |
Reads the current frequency for RX and TX for the radio.
This function reads the radio frequency used for RX and RX..
- Returns:
- Current radio frequency setting.
Definition at line 1449 of file fsl_xcvr.c.
| link_layer_t XCVR_GetIRQMapping | ( | uint8_t | int_num ) |
Get the mapping of the one of the radio IRQs.
This function reads the setting for the mapping of one of the radio LL IRQ signals to the 2.4G Radio INT0 and 2.4G Radio INT1 lines.
- Parameters:
-
int_num the number, 0 or 1, of the INT line to fetched.
- Returns:
- the mapping setting of the specified line.
- Note:
- Any value passed into this routine other than 0 will be treated as a 1.
Definition at line 1301 of file fsl_xcvr.c.
| int8_t XCVR_GetRssiAdjustment | ( | void | ) |
Controls getting the RSSI adjustment..
This function enables the upper layers to read the current XCVR RSSI adjustment value. The returned value is a signed 8-bit value, in 1/4 dBm step.
- Returns:
- The RSSI adjustment value..
Definition at line 1357 of file fsl_xcvr.c.
| uint8_t XCVR_GetXtalTrim | ( | void | ) |
Controls getting the XTAL trim value..
This function enables the upper layers to read the current XTAL compensation factors. The returned value is in the range 0..127 (7 bits).
- Returns:
- The XTAL trim compensation factors..
Definition at line 1342 of file fsl_xcvr.c.
| healthStatus_t XCVR_HealthCheck | ( | void | ) |
Read the health status of the XCVR to detect errors.
This function enables the upper layers to request the current radio health.
- Returns:
- The health status of the radio..
Definition at line 1224 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_Init | ( | radio_mode_t | radio_mode, |
| data_rate_t | data_rate | ||
| ) |
Initializes an XCVR instance.
This function initializes the XCVR module according to the radio_mode and data_rate settings. This the only function call required to start up the XCVR in most situations.
- Parameters:
-
radio_mode The radio mode for which the XCVR should be configured. data_rate The data rate for which the XCVR should be configured. Only matters when GFSK/MSK radio_mode is selected.
- Note:
- This function encompasses the XCVRGetDefafultConfig() and XCVR_Configure() functions.
Definition at line 328 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_OverrideChannel | ( | uint8_t | channel, |
| uint8_t | useMappedChannel | ||
| ) |
Controls setting the PLL to a particular channel.
This function enables setting the radio channel for TX and RX.
- Parameters:
-
channel the channel number to set useMappedChannel when true, channel is assumed to be from the protocol specific channel map. when false, channel is assumed to be from the 128 general channel list..
- Returns:
- The status of the channel over-ride.
Definition at line 1365 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_OverrideFrequency | ( | uint32_t | freq, |
| uint32_t | refOsc | ||
| ) |
Set an arbitrary frequency for RX and TX for the radio.
This function sets the radio frequency used for RX and RX..
- Parameters:
-
freq target frequency setting in Hz. refOsc reference oscillator setting in Hz.
- Returns:
- status of the frequency change.
Definition at line 1133 of file fsl_xcvr.c.
| void XCVR_RegisterPanicCb | ( | panic_fptr | fptr ) |
Register a callback from upper layers.
This function registers a callback from the upper layers for the radio to call in case of fatal errors.
- Parameters:
-
fptr The function pointer to a panic callback.
Definition at line 1202 of file fsl_xcvr.c.
| void XCVR_Reset | ( | void | ) |
Set XCVR register to reset value.
This function set XCVR register to the reset value.
Definition at line 1088 of file fsl_xcvr.c.
| void XCVR_SetBSM_NTW_Address | ( | uint32_t | bsm_ntw_address ) |
Sets the network address used by the PHY during BLE Bit Streaming Mode.
This function programs the register in the PHY which contains the network address used during BSM.
- Parameters:
-
bsm_ntw_address the address to be used during BSM. @ note This routine does NOT enable BSM.
Definition at line 1266 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_SetIRQMapping | ( | radio_mode_t | irq0_mapping, |
| radio_mode_t | irq1_mapping | ||
| ) |
Change the mapping of the radio IRQs.
This function changes the mapping of the radio LL IRQ signals to the 2.4G Radio INT0 and 2.4G Radio INT1 lines.
- Parameters:
-
irq0_mapping the LL which should be mapped to the INT0 line. irq1_mapping the LL which should be mapped to the INT1 line.
- Returns:
- status of the mapping request. @ note The radio_mode_t parameters map to link_layer_t selections for the LL which is connected to the INT line.
- Warning:
- The same LL must NOT be mapped to both INT lines.
Definition at line 1278 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_SetRssiAdjustment | ( | int8_t | adj ) |
Controls setting the RSSI adjustment..
This function enables the upper layers to set an RSSI adjustment value.
- Parameters:
-
adj the adjustment value to apply to the RSSI adjustment register. The value must be a signed 8-bit value, in 1/4 dBm step.
- Returns:
- The health status of the radio..
Definition at line 1350 of file fsl_xcvr.c.
| xcvrStatus_t XCVR_SetXtalTrim | ( | uint8_t | xtalTrim ) |
Controls setting the XTAL trim value..
This function enables the upper layers set a crystal trim compensation facor
- Parameters:
-
xtalTrim the trim value to apply to the XTAL trimming register. Only the 7 LSB are valid, setting the 8th bit returns an error.
- Returns:
- The health status of the radio..
Definition at line 1327 of file fsl_xcvr.c.
| void XcvrCalDelay | ( | uint32_t | time ) |
Temporary delay function.
*********************************************************************************
- Parameters:
-
[in] none.
- Returns:
- none.
Definition at line 356 of file fsl_xcvr_trim.c.
Variable Documentation
XCVR 1Mbps DATA RATE specific configure structure.
Definition at line 51 of file fsl_xcvr_mode_datarate_config.c.
XCVR 250K bps DATA RATE specific configure structure.
Definition at line 161 of file fsl_xcvr_mode_datarate_config.c.
XCVR 500K bps DATA RATE specific configure structure.
Definition at line 106 of file fsl_xcvr_mode_datarate_config.c.
XCVR 500K bps DATA RATE specific configure structure.
Definition at line 195 of file fsl_xcvr_zgbe_config.c.
Generated on Wed Jul 13 2022 07:46:57 by
1.7.2