max4146x_comp

Dependencies:   MAX14690

Embed: (wiki syntax)

« Back to documentation index

MAX4146X< REG > Class Template Reference

MAX4146X< REG > Class Template Reference

Base Class for All Maxim Max4146x RF Transmitters. More...

#include <Max4146x.h>

Public Types

enum  xoclkdelay_t { XOCLKDELAY_0_CYCLE, XOCLKDELAY_16_CYCLE, XOCLKDELAY_32_CYCLE, XOCLKDELAY_64_CYCLE }
 

Register Configuration.

More...
enum  xoclkdiv_t { XOCLKDIV_BY_4, XOCLKDIV_BY_5, XOCLKDIV_BY_6, XOCLKDIV_BY_7 }
 

Register Configuration.

More...
enum  fskshape_t { FSKSHAPE_DISABLE, FSKSHAPE_ENABLE }
 

Register Configuration.

More...
enum  sync_t { SYNC_0, SYNC_1 }
 

Register Configuration.

More...
enum  modmode_t { MODMODE_ASK, MODMODE_FSK }
 

Register Configuration.

More...
enum  clkout_delay_t { CLKOUT_DELAY_64_CYCLE, CLKOUT_DELAY_128_CYCLE, CLKOUT_DELAY_256_CYCLE, CLKOUT_DELAY_512_CYCLE }
 

Register Configuration.

More...
enum  bclk_postdiv_t {
  BCLK_POSTDIV_RESERVED_0, BCLK_POSTDIV_BY_1, BCLK_POSTDIV_BY_2, BCLK_POSTDIV_BY_3,
  BCLK_POSTDIV_BY_4, BCLK_POSTDIV_BY_5, BCLK_POSTDIV_RESERVED_6, BCLK_POSTDIV_RESERVED_7
}
 

Register Configuration.

More...
enum  pwdn_mode_t { PWDN_MODE_SHUTDOWN, PWDN_MODE_STANDBY, PWDN_MODE_FAST_WAKEUP, PWDN_MODE_REVERT_TO_FAST_WAKEUP }
 

Register Configuration.

More...
enum  pa_boost_t { PA_BOOST_NORMAL_MODE, PA_BOOST_BOOST_MODE }
 

Register Configuration.

More...
enum  papwr_t {
  PAPWR_1_DRIVER, PAPWR_2_DRIVER, PAPWR_3_DRIVER, PAPWR_4_DRIVER,
  PAPWR_5_DRIVER, PAPWR_6_DRIVER, PAPWR_7_DRIVER, PAPWR_8_DRIVER
}
 

Register Configuration.

More...
enum  pacap_t
 

Register Configuration.

More...
enum  cplin_t { CPLIN_NO_EXTRA_CURRENT, CPLIN_CHARGE_PUMP_CURRENT_5_PERCENT, CPLIN_CHARGE_PUMP_CURRENT_10_PERCENT, CPLIN_CHARGE_PUMP_CURRENT_15_PERCENT }
 

Register Configuration.

More...
enum  fracmode_t { FRACMODE_INTEGER_N, RACMODE_FRACTIONAL_N }
 

Register Configuration.

More...
enum  lodiv_t { LODIV_DISABLED, LODIV_DIVIDE_BY_4, LODIV_DIVIDE_BY_8, LODIV_DIVIDE_BY_12 }
enum  lomode_t { LOMODE_RING_OSCILLATOR, LOMODE_LC_VCO }
 

Register Configuration.

More...
enum  cpval_t { CPVAL_5_UA, CPVAL_10_UA, CPVAL_15_UA, CPVAL_20_UA }
 

Register Configuration.

More...
enum  i2c_txen1_t { I2C_TXEN1_DISABLE, I2C_TXEN1_ENABLE }
 

Register Configuration.

More...
enum  spi_txen1_t { SPI_TXEN1_DISABLE, SPI_TXEN1_ENABLE }
 

Register Configuration.

More...
enum  fourwire1_t { FOURWIRE1_READBACK_DISABLE, FOURWIRE1_READBACK_ENABLE }
 

Register Configuration.

More...
enum  i2c_txen2_t { I2C_TXEN2_DISABLE, I2C_TXEN2_ENABLE }
 

Register Configuration.

More...
enum  spi_txen2_t { SPI_TXEN2_DISABLE, SPI_TXEN2_ENABLE }
 

Register Configuration.

More...
enum  fourwire2_t { FOURWIRE2_READBACK_DISABLE, FOURWIRE2_READBACK_ENABLE }
 

Register Configuration.

More...
enum  pktlen_mode_t { PKTLEN_MODE_SET_LENGTH, PKTLEN_MODE_NO_SET_LENGTH }
 

Register Configuration.

More...
enum  softreset_t { SOFTRESET_DEASSERT, SOFTRESET_RESET }
 

Register Configuration.

More...
enum  operation_mode_t
 

Operation state of the rf transmitter.

More...

Public Member Functions

int set_xoclkdelay (xoclkdelay_t delay)
 Set start delay before enabling XO clock to digital block.
int get_xoclkdelay (xoclkdelay_t *delay)
 Get start delay before enabling XO clock to digital block.
int set_xoclkdiv (xoclkdiv_t div)
 Set XO clock division ratio for digital block.
int get_xoclkdiv (xoclkdiv_t *div)
 Get XO clock division ratio for digital block.
int set_fskshape (fskshape_t shape)
 Sets the state of FSK Gaussian Shaping.
int get_fskshape (fskshape_t *shape)
 Gets the state of FSK Gaussian Shaping.
int set_sync (sync_t state)
 Sets the state of clock pin.
int get_sync (sync_t *state)
 Gets the state of clock pin.
int set_modmode (modmode_t mode)
 Sets modulator mode to ASK or FSK.
int get_modmode (modmode_t *mode)
 Gets modulator mode.
int set_clkout_delay (clkout_delay_t delay)
 Sets clkout delay.
int get_clkout_delay (clkout_delay_t *delay)
 Gets clkout delay.
int set_bclk_postdiv (bclk_postdiv_t div)
 Sets baud clock post-divider.
int get_bclk_postdiv (bclk_postdiv_t *div)
 Gets baud clock post-divider.
int set_pwdn_mode (pwdn_mode_t pwdn_mode)
 Sets power down mode.
int get_pwdn_mode (pwdn_mode_t *pwdn_mode)
 Gets power down mode.
int set_pa_boost (pa_boost_t pa_boost)
 enable/disable boost mode
int get_pa_boost (pa_boost_t *pa_boost)
 Gets boost mode.
int set_papwr (papwr_t papwr)
 set PA output power by enabling parallel drivers
int get_papwr (papwr_t *papwr)
 Gets PA output power.
int set_pacap (pacap_t pacap)
 set shunt capacitance value
int get_pacap (pacap_t *pacap)
 Gets shunt capacitance value.
int set_cplin (cplin_t cplin)
 set level of charge pump offset current
int get_cplin (cplin_t *cplin)
 Gets level of charge pump offset current.
int set_fracmode (fracmode_t fracmode)
 set PLL mode
int get_fracmode (fracmode_t *fracmode)
 Gets PLL mode.
int set_lodiv (lodiv_t lodiv)
 set divider of LC VCO
int get_lodiv (lodiv_t *lodiv)
 Gets divider of LC VCO.
int set_lomode (lomode_t lomode)
 set LO generation
int get_lomode (lomode_t *lomode)
 Gets LO generation.
int set_cpval (cpval_t cpval)
 set charge pump current
int get_cpval (cpval_t *cpval)
 Gets charge pump current.
int set_pktlen_mode (pktlen_mode_t pktlen_mode)
 set packet length
int get_pktlen_mode (pktlen_mode_t *pktlen_mode)
 Gets packet length.
int set_softreset (softreset_t softreset)
 set softreset bit
int get_fifo_flags (uint8_t *fifo_flags)
 get fifo flags (I2C6) Read only
int get_pktcomplete (uint8_t *pktcomplete)
 get pktcomplete bit field flags (I2C4) Read only
int get_tx_pktlen (uint16_t *pktlen)
 get packet length of transmitted packet
int read_register (uint8_t reg, uint8_t *value, uint8_t len)
 Read from a register.
int write_register (uint8_t reg, const uint8_t *value, uint8_t len)
 Write to a register.
int initial_programming (void)
 Initial programming steps after power on or soft reset.
int set_bclk_prediv (uint8_t prediv)
 Set Baud clock predivision ratio.
int get_bclk_prediv (uint8_t *prediv)
 Gets Baud clock predivision ratio.
int set_tstep (uint8_t tstep)
 Controls GFSK shaping.
int get_tstep (uint8_t *tstep)
 Gets tstep.
int set_frequency (uint32_t freq)
 Set PLL frequency.
int get_frequency (uint32_t *freq)
 Gets PLL frequency.
int set_deltaf (uint8_t deltaf)
 Set frequency deviation from the space frequency for the mark frequency.
int get_deltaf (uint8_t *deltaf)
 Get frequency deviation from the space frequency for the mark frequency.
int set_deltaf_shape (uint8_t deltaf_shape)
 Set frequency deviation from the space frequency for the mark frequency.
int get_deltaf_shape (uint8_t *deltaf_shape)
 Gets frequency deviation from the space frequency for the mark frequency.
int set_i2c_pktlen (uint16_t pktlen)
 Set Packet Length for I2C communication.
int get_i2c_pktlen (uint16_t *pktlen)
 Gets Packet Length for I2C communication.
int adjust_baudrate (float rate)
 Adjust baud rate.
float get_baudrate ()
 Gets baud rate.
int adjust_manchester_bitrate (char rate)
 Adjust Manchester Bitrate.
char get_manchester_bitrate ()
 Get Manchester Bitrate.
int set_crystal_frequency (float freq)
 Configures the crystal frequency of the chip (Fxtal)
float get_crystal_frequency ()
 Get the crystal frequency of the chip (Fxtal)
int set_center_frequency (float freq)
 Adjust center/carrier frequency of the chip.
float get_center_frequency ()
 Gets center/carrier frequency of the chip.
int adjust_frequency_deviation (float deviation)
 set the FSK deviation values (Delta_f)
int send_data (uint8_t *data, uint32_t length)
 Send data for selected Preset/I2C/SPI mode.

Detailed Description

template<class REG>
class MAX4146X< REG >

Base Class for All Maxim Max4146x RF Transmitters.

The MAX4146X is a UHF sub-GHz ISM/SRD transmitter

Definition at line 52 of file Max4146x.h.


Member Enumeration Documentation

Register Configuration.

  • Register : CFG2(0x01)
  • Bit Fields : [2:0]
  • Default : 0x1
  • Description : Baud clock post-divider setting.
Enumerator:
BCLK_POSTDIV_RESERVED_0 

0x0: RESERVED

BCLK_POSTDIV_BY_1 

0x1: Divide by 1

BCLK_POSTDIV_BY_2 

0x2: Divide by 2

BCLK_POSTDIV_BY_3 

0x3: Divide by 3

BCLK_POSTDIV_BY_4 

0x4: Divide by 4

BCLK_POSTDIV_BY_5 

0x5: Divide by 5

BCLK_POSTDIV_RESERVED_6 

0x6: RESERVED

BCLK_POSTDIV_RESERVED_7 

0x7: RESERVED

Definition at line 336 of file Max4146x.h.

Register Configuration.

  • Register : CFG2(0x01)
  • Bit Fields : [7:6]
  • Default : 0x2
  • Description : Selects the delay when CLKOUT starts toggling upon exiting SHUTDOWN mode, in divided XO clock cycles
Enumerator:
CLKOUT_DELAY_64_CYCLE 

0x0: CLKOUT will start toggling after 64 cycles whenever moving into normal mode from shutdown mode

CLKOUT_DELAY_128_CYCLE 

0x1: CLKOUT will start toggling after 128 cycles whenever moving into normal mode from shutdown mode

CLKOUT_DELAY_256_CYCLE 

0x2: CLKOUT will start toggling after 256 cycles whenever moving into normal mode from shutdown mode

CLKOUT_DELAY_512_CYCLE 

0x3: CLKOUT will start toggling after 512 cycles whenever moving into normal mode from shutdown mode

Definition at line 298 of file Max4146x.h.

enum cplin_t

Register Configuration.

  • Register : PLL1(0x08)
  • Bit Fields : [7:6] -Default : 0x1
  • Description : Sets the level of charge pump offset current for fractional N mode to improve close in phase noise. Set to 'DISABLED' for integer N mode.
Enumerator:
CPLIN_NO_EXTRA_CURRENT 

0x0: No extra current

CPLIN_CHARGE_PUMP_CURRENT_5_PERCENT 

0x1: 5% of charge pump current

CPLIN_CHARGE_PUMP_CURRENT_10_PERCENT 

0x2: 10% of charge pump current

CPLIN_CHARGE_PUMP_CURRENT_15_PERCENT 

0x3: 15% of charge pump current

Definition at line 547 of file Max4146x.h.

enum cpval_t

Register Configuration.

  • Register : PLL2(0x09)
  • Bit Fields : [1:0]
  • Default : 0x0
  • Description : Sets Charge Pump Current in microAmpere
Enumerator:
CPVAL_5_UA 

0x0: 5�A

CPVAL_10_UA 

0x1: 10�A

CPVAL_15_UA 

0x2: 15�A

CPVAL_20_UA 

0x3: 20�A

Definition at line 681 of file Max4146x.h.

Register Configuration.

  • Register : CFG6(0x0A)
  • Bit Fields : [0]
  • Default : 0b0
  • Description : Four wire readback on CLKOUT pin mode.
Enumerator:
FOURWIRE1_READBACK_DISABLE 

0x0: Four wire readback disabled.

FOURWIRE1_READBACK_ENABLE 

0x1: Four wire readback enabled.

Definition at line 745 of file Max4146x.h.

Register Configuration.

  • Register : CFG7(0x10)
  • Bit Fields : [0]
  • Default : 0b0
  • Description : Four wire readback on CLKOUT pin mode. Aliased address for FOURWIRE1
Enumerator:
FOURWIRE2_READBACK_DISABLE 

0x0: Four wire readback disabled.

FOURWIRE2_READBACK_ENABLE 

0x1: Four wire readback enabled.

Definition at line 790 of file Max4146x.h.

enum fracmode_t

Register Configuration.

  • Register : PLL1(0x08)
  • Bit Fields : [5]
  • Default : 0b1
  • Description : Sets PLL between fractional-N and integer-N mode.
Enumerator:
FRACMODE_INTEGER_N 

0x0: Integer N Mode

RACMODE_FRACTIONAL_N 

0x1: Fractional N Mode

Definition at line 583 of file Max4146x.h.

enum fskshape_t

Register Configuration.

  • Register : CFG1(0x00)
  • Bit Fields : [2]
  • Default : 0b0
  • Description : Sets the state of FSK Gaussian Shaping
Enumerator:
FSKSHAPE_DISABLE 

0x0: FSK Shaping disabled

FSKSHAPE_ENABLE 

0x1: FSK Shaping enabled

Definition at line 199 of file Max4146x.h.

Register Configuration.

  • Register : CFG6(0x0A)
  • Bit Fields : [2]
  • Default : 0b0
  • Description : Enables DATA transmission in I2C mode. Aliased address for I2C_TXEN1.
Enumerator:
I2C_TXEN1_DISABLE 

0x0: Data transmission not enabled in I2C mode.

I2C_TXEN1_ENABLE 

0x1: Data transmission enabled in I2C mode.

Definition at line 715 of file Max4146x.h.

Register Configuration.

  • Register : CFG7(0x10)
  • Bit Fields : [2]
  • Default : 0b0
  • Description : Enables DATA transmission in I2C mode. Aliased address for I2C_TXEN1
Enumerator:
I2C_TXEN2_DISABLE 

0x0: Data transmission not enabled in I2C mode.

I2C_TXEN2_ENABLE 

0x1: Data transmission enabled in I2C mode.

Definition at line 760 of file Max4146x.h.

enum lodiv_t
Enumerator:
LODIV_DISABLED 

0x0: Disabled

LODIV_DIVIDE_BY_4 

0x1: LC VCO divided by 4

LODIV_DIVIDE_BY_8 

0x2: LC VCO divided by 8

LODIV_DIVIDE_BY_12 

0x3: LC VCO divided by 12

Definition at line 613 of file Max4146x.h.

enum lomode_t

Register Configuration.

  • Register : PLL1(0x08)
  • Bit Fields : [0]
  • Default : 0b0
  • Description : Sets LO generation. For lower power, choose LOWCURRENT. For higher performance, choose LOWNOISE
Enumerator:
LOMODE_RING_OSCILLATOR 

0x0: Ring Oscillator Mode

LOMODE_LC_VCO 

0x1: LC VCO Mode

Definition at line 648 of file Max4146x.h.

enum modmode_t

Register Configuration.

  • Register : CFG1(0x00)
  • Bit Fields : [0]
  • Default : 0b0
  • Description : Configures modulator mode
Enumerator:
MODMODE_ASK 

0x0: ASK Mode

MODMODE_FSK 

0x1: FSK Mode

Definition at line 264 of file Max4146x.h.

Operation state of the rf transmitter.

  • Default : 0b0
  • Description : Places DUT into software reset.

Definition at line 866 of file Max4146x.h.

enum pa_boost_t

Register Configuration.

  • Register : SHDN(0x05)
  • Bit Fields : [0]
  • Default : 0x0
  • Description : Enables a boost in PA output power for frequencies above 850MHz. This requires a different PA match compared to normal operation.
Enumerator:
PA_BOOST_NORMAL_MODE 

0x0: PA Output power in normal operation.

PA_BOOST_BOOST_MODE 

0x1: PA Output power in boost mode for more output power.

Definition at line 412 of file Max4146x.h.

enum pacap_t

Register Configuration.

  • Register : PA2(0x07)
  • Bit Fields : [4:0]
  • Default : 0x00
  • Description : Controls shunt capacitance on PA output in fF.

Definition at line 483 of file Max4146x.h.

enum papwr_t

Register Configuration.

  • Register : PA1(0x06)
  • Bit Fields : [2:0]
  • Default : 0x0
  • Description : Controls the PA output power by enabling parallel drivers.
Enumerator:
PAPWR_1_DRIVER 

0x0: Minimum, 1 driver

PAPWR_2_DRIVER 

0x1: 2 Drivers

PAPWR_3_DRIVER 

0x2: 3 Drivers

PAPWR_4_DRIVER 

0x3: 4 Drivers

PAPWR_5_DRIVER 

0x4: 5 Drivers

PAPWR_6_DRIVER 

0x5: 6 Drivers

PAPWR_7_DRIVER 

0x6: 7 Drivers

PAPWR_8_DRIVER 

0x7: 8 Drivers

Definition at line 444 of file Max4146x.h.

Register Configuration.

  • Register : I2C1(0x11)
  • Bit Fields : [7]
  • Default : 0b0
  • Description : Packet Length Mode
Enumerator:
PKTLEN_MODE_SET_LENGTH 

0x0: PKTLEN[14:0] need not be programmed.

FIFO underflow event will be treated as end of packet event. For cases where actual packet length is greater than 32767 bits, it is expected that the �C will pad such a packet to make it an integral multiple of 8-bits

PKTLEN_MODE_NO_SET_LENGTH 

0x1: PKTLEN[14:0] will provide the length of packet.

Once FIFO is read for PKTLEN[14:0] bits, or if FIFO underflow, MAX4146x will consider that as an end of packet event.

Definition at line 807 of file Max4146x.h.

Register Configuration.

  • Register : CFG4(0x03)
  • Bit Fields : [1:0]
  • Default : 0x0
  • Description : Power Down Mode Select.
Enumerator:
PWDN_MODE_SHUTDOWN 

0x0: SHUTDOWN low power state is enabled.

While entering low power state, XO, PLL, and PA are shutdown.

PWDN_MODE_STANDBY 

0x1: STANDBY low power state is enabled.

While entering low power state, XO is enabled. PLL and PA are shutdown

PWDN_MODE_FAST_WAKEUP 

0x2: FAST WAKEUP low power state is enabled.

While entering low power state, XO and PLL are enabled. PA is shutdown.

PWDN_MODE_REVERT_TO_FAST_WAKEUP 

0x3: Will revert to 0x2

Definition at line 374 of file Max4146x.h.

Register Configuration.

  • Register : CFG8(0x17)
  • Bit Fields : [0]
  • Default : 0b0
  • Description : Places DUT into software reset.
Enumerator:
SOFTRESET_DEASSERT 

0x0: Deassert the reset

SOFTRESET_RESET 

0x1: Resets the entire digital, until this bit is set to 0

Definition at line 845 of file Max4146x.h.

Register Configuration.

  • Register : CFG6(0x0A)
  • Bit Fields : [1]
  • Default : 0b0
  • Description : Transmission enable.
Enumerator:
SPI_TXEN1_DISABLE 

0x0: Transmission disabled.

SPI_TXEN1_ENABLE 

0x1: Transmission enabled.

Definition at line 730 of file Max4146x.h.

Register Configuration.

  • Register : CFG7(0x10)
  • Bit Fields : [1]
  • Default : 0b0
  • Description : Transmission enable.
Enumerator:
SPI_TXEN2_DISABLE 

0x0: Transmission disabled.

SPI_TXEN2_ENABLE 

0x1: Transmission enabled.

Definition at line 775 of file Max4146x.h.

enum sync_t

Register Configuration.

  • Register : CFG1(0x00)
  • Bit Fields : [1]
  • Default : 0b0
  • Description : Controls if clock output acts as an input. When an input, it will sample the DATA pin.
Enumerator:
SYNC_0 

0x0: asynchronous transmission mode

SYNC_1 

0x1: synchronous transmission mode

Definition at line 232 of file Max4146x.h.

Register Configuration.

  • Register : CFG1(0x00)
  • Bit Fields : [7:6]
  • Default : 0x2
  • Description : Start delay before enabling XO clock to digital block
Enumerator:
XOCLKDELAY_0_CYCLE 

0x0: No delay.

XO clock is immediately enabled to rest of digital block

XOCLKDELAY_16_CYCLE 

0x1: XO clock is enabled after 16 cycles to rest of digital block

XOCLKDELAY_32_CYCLE 

0x2: XO clock is enabled after 32 cycles to rest of digital block

XOCLKDELAY_64_CYCLE 

0x3: XO clock is enabled after 64 cycles to rest of digital block

Definition at line 130 of file Max4146x.h.

enum xoclkdiv_t

Register Configuration.

-Register : CFG1(0x00)

  • Bit Fields : [5:4]
  • Default : 0x2
  • Description : XO clock division ratio for digital block
Enumerator:
XOCLKDIV_BY_4 

0x0: Divide XO clock by 4 for digital clock

XOCLKDIV_BY_5 

0x1: Divide XO clock by 5 for digital clock.

High time is 2 cycles, low time is 3 cycles

XOCLKDIV_BY_6 

0x2: Divide XO clock by 6 for digital clock

XOCLKDIV_BY_7 

0x3: Divide XO clock by 7 for digital clock.

High time is 3 cycles, and low time is 4 cycles

Definition at line 164 of file Max4146x.h.


Member Function Documentation

int adjust_baudrate ( float  rate )

Adjust baud rate.

Parameters:
[in]baud_ratepreferred baud rate
Returns:
0 on success, negative error code on failure.

It changes only the values of BCLK_PREDIV and BCLK_POSTDIV Baud_rate = f_clk/((1+BCLK_PREDIV)x2^(1+BCLK_POSTDIV)) where f_clk = f_xtal/XOCLKDIV_ratio Note that to maintain the internal 3.2MHz time base, XOCLKDIV[1:0] (register CFG1, 0x00, bit 4) must be programmed, based on the crystal frequency

Definition at line 313 of file Max4146x.cpp.

int adjust_frequency_deviation ( float  deviation )

set the FSK deviation values (Delta_f)

Parameters:
[in]deviationdeviation value in in kHz baud rate
Returns:
0 on success, negative error code on failure.

The mark frequency is defined by the space frequency plus a frequency deviation. If frequency shaping is disabled by setting FSKSHAPE = 0 (register CFG1, bit 2), the frequency deviation is defined by DELTAF[6:0] (register PLL6, bits 6:0). DELTAF[6 : 0] = (Delta_f * 8192)f_xtal If frequency shaping is enabled by setting FSKSHAPE = 1 (register CFG1, bit 2), the frequency deviation is defined by DETLAF_SHAPE[3:0] (register PLL7, bits 3:0). DELTAF_SHAPE[3 : 0] = (Delta_f * 8192)/(f_xtal * 10)

Definition at line 357 of file Max4146x.cpp.

int adjust_manchester_bitrate ( char  rate )

Adjust Manchester Bitrate.

Parameters:
[in]data_ratepreferred data rate in (1-50)kbps
Returns:
0 on success, negative error code on failure.

Definition at line 381 of file Max4146x.cpp.

float get_baudrate (  )

Gets baud rate.

Returns:
baud rate.

Definition at line 351 of file Max4146x.cpp.

int get_bclk_postdiv ( bclk_postdiv_t div )

Gets baud clock post-divider.

Parameters:
[in]divdivider value
Returns:
0 on success, negative error code on failure.

Definition at line 745 of file Max4146x.cpp.

int get_bclk_prediv ( uint8_t *  prediv )

Gets Baud clock predivision ratio.

Parameters:
[in]predivvalues between 3 and 255
Returns:
0 on success, negative error code on failure.

Definition at line 772 of file Max4146x.cpp.

float get_center_frequency (  )

Gets center/carrier frequency of the chip.

Returns:
center/carrier frequency value between 250 MHz and 950 MHz

Definition at line 307 of file Max4146x.cpp.

int get_clkout_delay ( clkout_delay_t delay )

Gets clkout delay.

Parameters:
[in]delaydelay cycles
Returns:
0 on success, negative error code on failure.

Definition at line 722 of file Max4146x.cpp.

int get_cplin ( cplin_t cplin )

Gets level of charge pump offset current.

Parameters:
[in]cplinpercentage of charge pump current
Returns:
0 on success, negative error code on failure.

Definition at line 935 of file Max4146x.cpp.

int get_cpval ( cpval_t cpval )

Gets charge pump current.

Parameters:
[in]cpvalcurrent value
Returns:
0 on success, negative error code on failure.

Definition at line 1028 of file Max4146x.cpp.

float get_crystal_frequency (  )

Get the crystal frequency of the chip (Fxtal)

Returns:
crystal frequency values between 12.8 MHz and 19.2 MHz

Definition at line 287 of file Max4146x.cpp.

int get_deltaf ( uint8_t *  deltaf )

Get frequency deviation from the space frequency for the mark frequency.

Parameters:
[in]deltaffrequency deviation value
Returns:
0 on success, negative error code on failure.

fDELTA = DELTAF[6:0]* fXTAL/8192

Definition at line 1081 of file Max4146x.cpp.

int get_deltaf_shape ( uint8_t *  deltaf_shape )

Gets frequency deviation from the space frequency for the mark frequency.

Parameters:
[in]deltaf_shapefrequency deviation value
Returns:
0 on success, negative error code on failure.

fDELTA = DELTAF_SHAPE[3:0]* fXTAL/81920

Definition at line 1108 of file Max4146x.cpp.

int get_fifo_flags ( uint8_t *  fifo_flags )

get fifo flags (I2C6) Read only

Parameters:
[in]fifo_flags8-bit fifo flags
Returns:
0 on success, negative error code on failure.

Definition at line 586 of file Max4146x.cpp.

int get_fracmode ( fracmode_t fracmode )

Gets PLL mode.

Parameters:
[in]fracmodeInteger N/Fractional N mode
Returns:
0 on success, negative error code on failure.

Definition at line 958 of file Max4146x.cpp.

int get_frequency ( uint32_t *  freq )

Gets PLL frequency.

Parameters:
[in]freqFREQ value to PLL between 0x00 and 0xFFFFFF
Returns:
0 on success, negative error code on failure.

LO frequency = FREQ<23:0>/2^16*fXTAL

Definition at line 1052 of file Max4146x.cpp.

int get_fskshape ( fskshape_t shape )

Gets the state of FSK Gaussian Shaping.

Parameters:
[in]shapeenable/disable fskshaping
Returns:
0 on success, negative error code on failure.

Definition at line 653 of file Max4146x.cpp.

int get_i2c_pktlen ( uint16_t *  pktlen )

Gets Packet Length for I2C communication.

Parameters:
[in]pktlenvalues between 0x00 and 0x7FF
Returns:
0 on success, negative error code on failure.

Definition at line 1161 of file Max4146x.cpp.

int get_lodiv ( lodiv_t lodiv )

Gets divider of LC VCO.

Parameters:
[in]lodivdivider value
Returns:
0 on success, negative error code on failure.

Definition at line 981 of file Max4146x.cpp.

int get_lomode ( lomode_t lomode )

Gets LO generation.

Parameters:
[in]lomodeselection of mode
Returns:
0 on success, negative error code on failure.

Definition at line 1004 of file Max4146x.cpp.

char get_manchester_bitrate (  )

Get Manchester Bitrate.

Returns:
data rate in (1-50)kbps

Definition at line 389 of file Max4146x.cpp.

int get_modmode ( modmode_t mode )

Gets modulator mode.

Parameters:
[in]modeASK or FSK
Returns:
0 on success, negative error code on failure.

Definition at line 699 of file Max4146x.cpp.

int get_pa_boost ( pa_boost_t pa_boost )

Gets boost mode.

Parameters:
[in]pa_boostpower amplifier output mode
Returns:
0 on success, negative error code on failure.

Definition at line 866 of file Max4146x.cpp.

int get_pacap ( pacap_t pacap )

Gets shunt capacitance value.

Parameters:
[in]pacapshunt capacitance value
Returns:
0 on success, negative error code on failure.

Definition at line 912 of file Max4146x.cpp.

int get_papwr ( papwr_t papwr )

Gets PA output power.

Parameters:
[in]papwrnumber of parallel drivers
Returns:
0 on success, negative error code on failure.

Definition at line 889 of file Max4146x.cpp.

int get_pktcomplete ( uint8_t *  pktcomplete )

get pktcomplete bit field flags (I2C4) Read only

Parameters:
[in]pktcomplete0x0: Packet transmission is not completed 0x1: Packet transmission is completed
Returns:
0 on success, negative error code on failure.

Definition at line 592 of file Max4146x.cpp.

int get_pktlen_mode ( pktlen_mode_t pktlen_mode )

Gets packet length.

Parameters:
[in]pktlen_modepacket length mode
Returns:
0 on success, negative error code on failure.

Definition at line 1131 of file Max4146x.cpp.

int get_pwdn_mode ( pwdn_mode_t pwdn_mode )

Gets power down mode.

Parameters:
[in]pwdn_modepower down mode
Returns:
0 on success, negative error code on failure.

Definition at line 795 of file Max4146x.cpp.

int get_sync ( sync_t state )

Gets the state of clock pin.

Parameters:
[in]statepin state async/sync
Returns:
0 on success, negative error code on failure.

Definition at line 676 of file Max4146x.cpp.

int get_tstep ( uint8_t *  tstep )

Gets tstep.

Parameters:
[in]tstepvalues between 0 and 31
Returns:
0 on success, negative error code on failure.

Definition at line 818 of file Max4146x.cpp.

int get_tx_pktlen ( uint16_t *  pktlen )

get packet length of transmitted packet

Parameters:
[in]pktlenProvides status information of bits transmitted for the current packet
Returns:
0 on success, negative error code on failure.

Definition at line 607 of file Max4146x.cpp.

int get_xoclkdelay ( xoclkdelay_t delay )

Get start delay before enabling XO clock to digital block.

Parameters:
[in]delaydelay cycle
Returns:
0 on success, negative error code on failure.

Definition at line 571 of file Max4146x.cpp.

int get_xoclkdiv ( xoclkdiv_t div )

Get XO clock division ratio for digital block.

Parameters:
[in]divdivision ratio
Returns:
0 on success, negative error code on failure.

Definition at line 630 of file Max4146x.cpp.

int initial_programming ( void   )

Initial programming steps after power on or soft reset.

Returns:
0 on success, negative error code on failure.

Definition at line 1181 of file Max4146x.cpp.

int read_register ( uint8_t  reg,
uint8_t *  value,
uint8_t  len 
)

Read from a register.

Parameters:
[in]regAddress of a register to be read.
[out]valuePointer to save result value.
[in]lenSize of result to be read.
Returns:
0 on success, negative error code on failure.

Definition at line 192 of file Max4146x.cpp.

int send_data ( uint8_t *  data,
uint32_t  length 
)

Send data for selected Preset/I2C/SPI mode.

Parameters:
[in]datadata pointer for data to be transferred
[in]lengthlegth of data to be transferred
Returns:
0 on success, negative error code on failure.

Definition at line 434 of file Max4146x.cpp.

int set_bclk_postdiv ( bclk_postdiv_t  div )

Sets baud clock post-divider.

Parameters:
[in]divdivider value
Returns:
0 on success, negative error code on failure.

Definition at line 737 of file Max4146x.cpp.

int set_bclk_prediv ( uint8_t  prediv )

Set Baud clock predivision ratio.

Parameters:
[in]predivvalues between 3 and 255
Returns:
0 on success, negative error code on failure.

Definition at line 760 of file Max4146x.cpp.

int set_center_frequency ( float  freq )

Adjust center/carrier frequency of the chip.

Parameters:
[in]freqcenter/carrier frequency value between 250 MHz and 950 MHz
Returns:
0 on success, negative error code on failure.

Definition at line 293 of file Max4146x.cpp.

int set_clkout_delay ( clkout_delay_t  delay )

Sets clkout delay.

Parameters:
[in]delaydelay cycles
Returns:
0 on success, negative error code on failure.

Definition at line 714 of file Max4146x.cpp.

int set_cplin ( cplin_t  cplin )

set level of charge pump offset current

Parameters:
[in]cplinpercentage of charge pump current
Returns:
0 on success, negative error code on failure.

Definition at line 927 of file Max4146x.cpp.

int set_cpval ( cpval_t  cpval )

set charge pump current

Parameters:
[in]cpvalcurrent value
Returns:
0 on success, negative error code on failure.

Definition at line 1019 of file Max4146x.cpp.

int set_crystal_frequency ( float  freq )

Configures the crystal frequency of the chip (Fxtal)

Parameters:
[in]freqcrystal frequency values between 12.8 MHz and 19.2 MHz
Returns:
0 on success, negative error code on failure.

Definition at line 276 of file Max4146x.cpp.

int set_deltaf ( uint8_t  deltaf )

Set frequency deviation from the space frequency for the mark frequency.

Parameters:
[in]deltaffrequency deviation value
Returns:
0 on success, negative error code on failure.

fDELTA = DELTAF[6:0]* fXTAL/8192

Definition at line 1069 of file Max4146x.cpp.

int set_deltaf_shape ( uint8_t  deltaf_shape )

Set frequency deviation from the space frequency for the mark frequency.

Parameters:
[in]deltaf_shapefrequency deviation value
Returns:
0 on success, negative error code on failure.

fDELTA = DELTAF_SHAPE[3:0]* fXTAL/81920

Definition at line 1096 of file Max4146x.cpp.

int set_fracmode ( fracmode_t  fracmode )

set PLL mode

Parameters:
[in]fracmodeInteger N/Fractional N mode
Returns:
0 on success, negative error code on failure.

Definition at line 950 of file Max4146x.cpp.

int set_frequency ( uint32_t  freq )

Set PLL frequency.

Parameters:
[in]freqFREQ value to PLL between 0x00 and 0xFFFFFF
Returns:
0 on success, negative error code on failure.

LO frequency = FREQ<23:0>/2^16*fXTAL

Definition at line 1043 of file Max4146x.cpp.

int set_fskshape ( fskshape_t  shape )

Sets the state of FSK Gaussian Shaping.

Parameters:
[in]shapeenable/disable fskshaping
Returns:
0 on success, negative error code on failure.

Definition at line 645 of file Max4146x.cpp.

int set_i2c_pktlen ( uint16_t  pktlen )

Set Packet Length for I2C communication.

Parameters:
[in]pktlenvalues between 0x00 and 0x7FF
Returns:
0 on success, negative error code on failure.

Definition at line 1147 of file Max4146x.cpp.

int set_lodiv ( lodiv_t  lodiv )

set divider of LC VCO

Parameters:
[in]lodivdivider value
Returns:
0 on success, negative error code on failure.

Definition at line 973 of file Max4146x.cpp.

int set_lomode ( lomode_t  lomode )

set LO generation

Parameters:
[in]lomodeselection of mode
Returns:
0 on success, negative error code on failure.

Definition at line 996 of file Max4146x.cpp.

int set_modmode ( modmode_t  mode )

Sets modulator mode to ASK or FSK.

Parameters:
[in]modeASK or FSK
Returns:
0 on success, negative error code on failure.

Definition at line 691 of file Max4146x.cpp.

int set_pa_boost ( pa_boost_t  pa_boost )

enable/disable boost mode

Parameters:
[in]pa_boostpower amplifier output mode
Returns:
0 on success, negative error code on failure.

Definition at line 858 of file Max4146x.cpp.

int set_pacap ( pacap_t  pacap )

set shunt capacitance value

Parameters:
[in]pacapshunt capacitance value
Returns:
0 on success, negative error code on failure.

Definition at line 904 of file Max4146x.cpp.

int set_papwr ( papwr_t  papwr )

set PA output power by enabling parallel drivers

Parameters:
[in]papwrnumber of parallel drivers
Returns:
0 on success, negative error code on failure.

Definition at line 881 of file Max4146x.cpp.

int set_pktlen_mode ( pktlen_mode_t  pktlen_mode )

set packet length

Parameters:
[in]pktlen_modepacket length mode
Returns:
0 on success, negative error code on failure.

Definition at line 1123 of file Max4146x.cpp.

int set_pwdn_mode ( pwdn_mode_t  pwdn_mode )

Sets power down mode.

Parameters:
[in]pwdn_modepower down mode
Returns:
0 on success, negative error code on failure.

Definition at line 787 of file Max4146x.cpp.

int set_softreset ( softreset_t  softreset )

set softreset bit

Parameters:
[in]softresetenable/disable
Returns:
0 on success, negative error code on failure.

Definition at line 555 of file Max4146x.cpp.

int set_sync ( sync_t  state )

Sets the state of clock pin.

Parameters:
[in]statepin state async/sync
Returns:
0 on success, negative error code on failure.

Definition at line 668 of file Max4146x.cpp.

int set_tstep ( uint8_t  tstep )

Controls GFSK shaping.

Parameters:
[in]tstepvalues between 0 and 31
Returns:
0 on success, negative error code on failure.

Definition at line 810 of file Max4146x.cpp.

int set_xoclkdelay ( xoclkdelay_t  delay )

Set start delay before enabling XO clock to digital block.

Parameters:
[in]delaydelay cycle
Returns:
0 on success, negative error code on failure.

Definition at line 563 of file Max4146x.cpp.

int set_xoclkdiv ( xoclkdiv_t  div )

Set XO clock division ratio for digital block.

Parameters:
[in]divdivision ratio
Returns:
0 on success, negative error code on failure.

Definition at line 622 of file Max4146x.cpp.

int write_register ( uint8_t  reg,
const uint8_t *  value,
uint8_t  len 
)

Write to a register.

Parameters:
[in]regAddress of a register to be written.
[out]valuePointer of value to be written to register.
[in]lenSize of result to be written.
Returns:
0 on success, negative error code on failure.

Definition at line 241 of file Max4146x.cpp.