= Maxim MAX2829 Control Library = The documentation for the library is included below. == [source:/PlatformSupport/WARP_Libraries/warpradio_max2829.c warpradio_max2829.c] == This file provides functions for controlling the WARP radio board's ADC and RF transceiver chips. '''References''' [[BR]]''baseaddr'' refers to the base address of the SPI core. [[BR]]''radbaseaddr'' is the base address of the Radio Controller peripheral. [[BR]]''radios'' is the value applied to the Slave Select Register to select the radios. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L134" void WARPRadio_InitializeSPI(unsigned int* baseaddr)]''''' [[BR]]Initializes the SPI controller. This function must be called before any radio setup functions can be used. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L144" void WarpRadio_InitializeRadio(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Initiates the selected radios. This function must be called at the start of the program and needs to be called only once. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios'' is the value applied to select the desired radios. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L180" void WarpRadio_RxEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Enables the receive mode in the radio board. Forcibly turns off the transmit mode and amplifiers. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios'' is the value applied to select the radios to be enabled. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L216" void WarpRadio_RxDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Disables receive mode in the specified radios. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios'' is the value applied to select the desired radios to be disabled. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L235" void WarpRadio_24AmpEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Turns on the 2.4GHz amplifier for the radios selected based on the value applied in ''radios''. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L254" void WarpRadio_24AmpDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Turns off the 2.4GHz amplifier for the radios selected based on the value applied in ''radios''. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L276" void WarpRadio_TxEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Enables the transmit mode on the Radios specified. Turns off the 2.4GHz and the 5Ghz amplifiers. ''radios'' refers to the Radios in the slots whose transmit mode is turned on. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios '' is the parameter used to specify for which radios to enable transmit mode. [[BR]] '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L305" void WarpRadio_TxDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Disables the transmit mode on the Radios specified and turns off both amplifiers. This function also disable the receive mode. ''radios'' refers to the Radios in the slots whose transmit mode is turned off. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios '' is the parameter used to specify for which radios to disable the transmit mode. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L335" void WarpRadio_SHDNEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Shuts down the radios specified. Forcibly turns off transmit and receive modes and shuts down amplifiers. ''radios'' refers to the Radios in the slots affected . ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios '' is the parameter used to specify which radios to shutdown. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L371" void WarpRadio_SHDNDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Takes the specified radios out of shutdown mode. Does not enable receive or transmit modes. ''radios'' refers to the Radios in the slots affected . ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios'' is the parameter used to specify which radios to remove from shutdown mode. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L392" void WarpRadio_Reset(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]]Reset the radio board registers that are specified in 'radios'. Goes through a set of instructions to achieve a reset of the radios. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. ''radios'' refers to the '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L445" void WarpRadio_RxHpEnable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]] Enable the RXHP bit in the 'radios' specified. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L466" void WarpRadio_RxHpDisable(unsigned int* baseaddr, unsigned int* radbaseaddr, unsigned char radios)]''''' [[BR]] Disable the RXHP bit in the 'radios' specified. ''baseaddr'' refers to the base address of the SPI core. ''radbaseaddr'' is the base address of the Radio Controller peripheral. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L503" int WarpRadio_SetCenterFreq2GHz(unsigned int* baseaddr, char freqset, unsigned char radios)]''''' [[BR]] Function used to shift the center frequency within the 2.4GHz band. ''radios'' signifies which Radios are affected by this function call. ''baseaddr'' refers to the base address of the SPI core. [[BR]]''freqset'' defines to which frequency to shift. 1: 2412 MHz[[BR]] 2: 2417 MHz[[BR]] 3: 2422 MHz[[BR]] 4: 2427 MHz[[BR]] 5: 2432 MHz[[BR]] 6: 2437 MHz[[BR]] 7: 2442 MHz[[BR]] 8: 2447 MHz[[BR]] 9: 2452 MHz[[BR]] 10: 2457 MHz[[BR]] 11: 2462 MHz[[BR]] 12: 2467 MHz[[BR]] 13: 2472 MHz[[BR]] 14: 2484 MHz[[BR]] Returns INVALID_FREQ if given ''freqset'' is not valid. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L683" int WarpRadio_SetCenterFreq5GHz(unsigned int* baseaddr, char freqset, unsigned char radios)]''''' [[BR]] Function used to shift the center frequency within the 5GHz band. ''radios'' signifies which Radios are affected by this function call. ''baseaddr'' refers to the base address of the SPI core. [[BR]]''freqset'' defines to which frequency to shift. 1: 5180 MHz[[BR]] 2: 5200 MHz[[BR]] 3: 5220 MHz[[BR]] 4: 5240 MHz[[BR]] 5: 5260 MHz[[BR]] 6: 5280 MHz[[BR]] 7: 5300 MHz[[BR]] 8: 5320 MHz[[BR]] 9: 5500 MHz[[BR]] 10: 5520 MHz[[BR]] 11: 5540 MHz[[BR]] 12: 5560 MHz[[BR]] 13: 5580 MHz[[BR]] 14: 5600 MHz[[BR]] 15: 5620 MHz[[BR]] 16: 5640 MHz[[BR]] 17: 5660 MHz[[BR]] 18: 5680 MHz[[BR]] 19: 5700 MHz[[BR]] 20: 5745 MHz[[BR]] 21: 5765 MHz[[BR]] 22: 5785 MHz[[BR]] 23: 5805 MHz[[BR]] Returns INVALID_FREQ if given ''freqset'' is not valid. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L998" void WarpRadio_TxCalibration(unsigned int* baseaddr, unsigned char radios)]''''' [[BR]] Put the radio into transmit calibration mode. 'radios' refers to the radios that will be put into calibration. The affected radios will be forcibly removed from receive calibration mode. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1024" void WarpRadio_RxCalibration(unsigned int* baseaddr, unsigned char radios)]''''' [[BR]] Put the radio into receive calibration mode. 'radios' refers to the radios that will be put into calibration. The affected radios will be forcibly removed from transmit calibration mode. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1051" void WarpRadio_NoCalibration(unsigned int* baseaddr, unsigned char radios)]''''' [[BR]] Takes the specified radios out of both transmit and receive calibration mode. ''radios'' refers to the Radios in the affected slots. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1084" int WarpRadio_TxCalGain(unsigned int* baseaddr, char gain, unsigned char radios)]''''' [[BR]] Sets the gain for Transmitter I/Q Calibration LO Leakage and Sideband-Detector Gain Control. Returns NOT_IN_CALIBRATION if any of the radios for which the gain is being set in not in calibration mode. Returns WARP_SUCCESS if value changed successfully. To be in calibration mode set TxCalibration.[[BR]]''gain'' sets the level of gain.[[BR]] ''gain'' = 0: -> 8db[[BR]] 1: -> 18db[[BR]] 2: -> 24db[[BR]] 3: -> 34db[[BR]] Returns INVALID_GAIN if the value set to ''gain'' is not valid.[[BR]]''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1233" int WarpRadio_SetMimoMode(unsigned int* baseaddr, char mode, unsigned char radios)]''''' [[BR]] Function enables or disables the MIMO mode for the specified ''radios''. ''mode'' = 0 turns off MIMO mode while ''mode'' = 1 enables the MIMO mode. Returns INVALID_MODE if mode is wrong or returns WARP_SUCCESS if successful. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1356" int WarpRadio_RssiHighBandwidth(unsigned int* baseaddr, char mode, unsigned char radios)]''''' [[BR]] This function is to enable or disable the RSSI High Bandwidth for the ''radios'' specified. ''mode''=0 disables the state and ''mode''=1 enables it. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1436" void WarpRadio_TxLpfCornFreqCoarseAdj(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]]Set the Transmit Low Pass Filter Corner Frequency. This is the Coarse adjustment for the frequency and affects the ''radios'' specified. [[BR]]''value'' is the adjustment parameter.[[BR]] ''value'' = 00: undefined[[BR]] 01: 12MHz (nominal mode)[[BR]] 10: 18MHz (turbo mode 1)[[BR]] 11: 24MHz (turbo mode 2)[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1482" void WarpRadio_RxLpfCornFreqCoarseAdj(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] Set the Receive Low Pass Filter Corner Frequency. This is the Coarse adjustment for the frequency and affects the ''radios'' specified. [[BR]]''value'' is the adjustment parameter.[[BR]] ''value'' = 00: 7.5MHz[[BR]] 01: 9.5MHz (nominal mode)[[BR]] 10: 14MHz (turbo mode 1)[[BR]] 11: 18MHz (turbo mode 2)[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1530" int WarpRadio_RxLpfCornFreqFineAdj(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] Set the Receive Low Pass Filter Corner Frequency. This is the Fine adjustment for the frequency and affects only the ''radios'' specified. [[BR]]''value'' is the adjustment parameter.[[BR]] ''value'' = 000: 90%[[BR]] 001: 95%[[BR]] 010: 100%[[BR]] 011: 105%[[BR]] 100: 110%[[BR]] 101-111: not applicable[[BR]] Returns OUT_OF_RANGE is value is out of range.[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1575" void WarpRadio_RxHighPassCornerFreq(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] Set the Recieve Highpass Filter Corner Frequency when RXHP=0. Affected Slots are defined in ''radios'' [[BR]]''value'' is the adjustment parameter.[[BR]] ''value'' = 0: 100Hz[[BR]] 1: 30kHz[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1618" int WarpRadio_SerialRxGain(unsigned int* baseaddr, short mode, unsigned char radios)]''''' [[BR]] Enable or disable Receive VGA Gain Programming serially. Affects ''radios'' specified.[[BR]] ''mode'' = 0: Receive VGA Gain programmed with external digital inputs.[[BR]] 1: Receive VGA Gain programmed with serial data bits in RxGain Register[[BR]] Returns INVALID_MODE is the mode is an invalid input.[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1669" int WarpRadio_SerialTxGain(unsigned int* baseaddr, short mode, unsigned char radios)]''''' [[BR]] Enable or disable Transmit VGA Gain Programming serially. Affects ''radios'' specified.[[BR]] ''mode'' = 0: Transmit VGA Gain programmed with external digital inputs.[[BR]] 1: Transmit VGA Gain programmed with serial data bits in TxGain Register[[BR]] Returns INVALID_MODE is the mode is an invalid input.[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1721" void WarpRadio_BaseBandTxGain(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] Set the Transmit Baseband Gain. Affects only the ''radios'' specified.[[BR]] ''value'' = 00: max baseband gain -5db[[BR]] 01: max baseband gain -3db[[BR]] 10: max baseband gain -1.5db[[BR]] 11: max baseband gain[[BR]] ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1759" void WarpRadio_RxLNAGainControl(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]]This function combined with RxVGAGainControl adjusts the total receive gain. The bits (''value'') of the function map to B7:B6. 00 is the lowest possible gain. Affects only the ''radios'' specified. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1799" void WarpRadio_RxVGAGainControl(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] This function combined with RxLNAGainControl adjusts the total receive gain. The 5 bits (''value'') of the function map to B5:B1. 00000 is the lowest possible gain. Affects only the ''radios'' specified. ''baseaddr'' refers to the base address of the SPI core. '''''[source:"/PlatformSupport/WARP_Libraries/warpradio_max2829.c@latest#L1838" void WarpRadio_TxVGAGainControl(unsigned int* baseaddr, char value, unsigned char radios)]''''' [[BR]] This function adjusts the total transmit gain. The 6 bits (''value'') of the function map to B6:B1. 000000 is the lowest possible gain. Affects only the ''radios'' specified. ''baseaddr'' refers to the base address of the SPI core.