PU2CLR Si4735 Arduino Library  1.1.9
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
SI473X data types

SI473X data representation. More...

Data Structures

union  si473x_powerup
 Power Up arguments data type. More...
 
struct  si473x_powerup.arg
 
union  si473x_gpio
 Data type for Enables output for GPO1, GPO2 and GPO3. More...
 
union  si473x_gpio_ien
 Data type for Configuring the sources for the GPO2/INT interrupt pin. More...
 
struct  si473x_gpio_ien.arg
 
struct  si473x_gpio.arg
 
union  si47x_frequency
 Represents how the frequency is stored in the si4735. More...
 
struct  si47x_frequency.raw
 
union  si47x_antenna_capacitor
 Antenna Tuning Capacitor data type manupulation. More...
 
struct  si47x_antenna_capacitor.raw
 
union  si47x_set_frequency
 AM Tune frequency data type command (AM_TUNE_FREQ command) More...
 
struct  si47x_set_frequency.arg
 
union  si47x_seek
 Seek frequency (automatic tuning) More...
 
struct  si47x_seek.arg
 
union  si47x_status
 Status response data representation. More...
 
struct  si47x_status.refined
 
union  si47x_response_status
 Response status command. More...
 
struct  si47x_response_status.resp
 
union  si47x_firmware_information
 Data representation for Firmware Information (GET_REV) More...
 
struct  si47x_firmware_information.resp
 
union  si47x_firmware_query_library
 Firmware Query Library ID response. More...
 
struct  si47x_firmware_query_library.resp
 
union  si47x_tune_status
 Seek station status. More...
 
struct  si47x_tune_status.arg
 
union  si47x_property
 Data type to deal with SET_PROPERTY command. More...
 
struct  si47x_property.raw
 

Detailed Description

SI473X data representation.

SI473X data types

The goal here is separate data from code. The Si47XX family works with many internal data that can be represented by data structure or defined data type in C/C++. These C/C++ resources have been used widely here.
This aproach made the library easier to build and maintain. Each data structure created here has its reference (name of the document and page on which it was based). In other words, to make the SI47XX device easier to deal, some defined data types were created to handle byte and bits to process commands, properties and responses. These data types will be usefull to deal with SI473X


Data Structure Documentation

◆ si473x_powerup

union si473x_powerup

Power Up arguments data type.

See also
Si47XX PROGRAMMING GUIDE; AN332; pages 64 and 65
Data Fields
struct si473x_powerup arg Refined powerup parameters.
uint8_t raw[2] Raw powerup parameters data. Same arg memory position. So, same content.

◆ si473x_powerup.arg

struct si473x_powerup.arg
Data Fields
uint8_t FUNC: 4 Function (0 = FM Receive; 1–14 = Reserved; 15 = Query Library ID)
uint8_t XOSCEN: 1 Crystal Oscillator Enable (0 = crystal oscillator disabled; 1 = Use crystal oscillator and and OPMODE=ANALOG AUDIO) .
uint8_t PATCH: 1 Patch Enable (0 = Boot normally; 1 = Copy non-volatile memory to RAM).
uint8_t GPO2OEN: 1 GPO2 Output Enable (0 = GPO2 output disabled; 1 = GPO2 output enabled).
uint8_t CTSIEN: 1 CTS Interrupt Enable (0 = CTS interrupt disabled; 1 = CTS interrupt enabled).
uint8_t OPMODE Application Setting. See page 65.

◆ si473x_gpio

union si473x_gpio

Data type for Enables output for GPO1, GPO2 and GPO3.

GPO1, 2, and 3 can be configured for output (Hi-Z or active drive) by setting the GPO1OEN, GPO2OEN, and GPO3OEN bit.

See also
Si47XX PROGRAMMING GUIDE; AN332; page 82 and 144
Data Fields
struct si473x_gpio arg Refined powerup parameters.
uint8_t raw

◆ si473x_gpio_ien

union si473x_gpio_ien

Data type for Configuring the sources for the GPO2/INT interrupt pin.

Valid sources are the lower 8 bits of the STATUS byte, including CTS, ERR, RSQINT, and STCINT bits.

See also
Si47XX PROGRAMMING GUIDE; AN332; page 146
Data Fields
struct si473x_gpio_ien arg
uint16_t raw

◆ si473x_gpio_ien.arg

struct si473x_gpio_ien.arg
Data Fields
uint8_t STCIEN: 1 Seek/Tune Complete Interrupt Enable (0 or 1).
uint8_t DUMMY1: 2 Always write 0.
uint8_t RSQIEN: 1 RSQ Interrupt Enable (0 or 1).
uint8_t DUMMY2: 2 Always write 0.
uint8_t ERRIEN: 1 ERR Interrupt Enable (0 or 1).
uint8_t CTSIEN: 1 CTS Interrupt Enable (0 or 1).
uint8_t STCREP: 1 STC Interrupt Repeat (0 or 1).
uint8_t DUMMY3: 2 Always write 0.
uint8_t RSQREP: 1 RSQ Interrupt Repeat (0 or 1).
uint8_t DUMMY4: 4 Always write 0.

◆ si473x_gpio.arg

struct si473x_gpio.arg
Data Fields
uint8_t DUMMY1: 1 Always write 0.
uint8_t GPO1OEN: 1 GPO1 Output Enable.
uint8_t GPO2OEN: 1 GPO2 Output Enable.
uint8_t GPO3OEN: 1 GPO3 Output Enable.
uint8_t DUMMY2: 4 Always write 0.

◆ si47x_frequency

union si47x_frequency

Represents how the frequency is stored in the si4735.

It helps to convert frequency in uint16_t to two bytes (uint8_t) (FREQL and FREQH)

Data Fields
struct si47x_frequency raw Raw data that represents the frequency stored in the Si47XX device.
uint16_t value frequency (integer value)

◆ si47x_frequency.raw

struct si47x_frequency.raw
Data Fields
uint8_t FREQL Tune Frequency Low byte.
uint8_t FREQH Tune Frequency High byte.

◆ si47x_antenna_capacitor

union si47x_antenna_capacitor

Antenna Tuning Capacitor data type manupulation.

Data Fields
struct si47x_antenna_capacitor raw
uint16_t value

◆ si47x_antenna_capacitor.raw

struct si47x_antenna_capacitor.raw
Data Fields
uint8_t ANTCAPL Antenna Tuning Capacitor High byte.
uint8_t ANTCAPH Antenna Tuning Capacitor Low byte.

◆ si47x_set_frequency

union si47x_set_frequency

AM Tune frequency data type command (AM_TUNE_FREQ command)

See also
Si47XX PROGRAMMING GUIDE; AN332; pages 135
Data Fields
struct si47x_set_frequency arg
uint8_t raw[5]

◆ si47x_set_frequency.arg

struct si47x_set_frequency.arg
Data Fields
uint8_t FAST: 1 ARG1 - FAST Tuning. If set, executes fast and invalidated tune. The tune status will not be accurate.
uint8_t FREEZE: 1 Valid only for FM (Must be 0 to AM)
uint8_t DUMMY1: 4 Always set 0.
uint8_t USBLSB: 2 SSB Upper Side Band (USB) and Lower Side Band (LSB) Selection. 10 = USB is selected; 01 = LSB is selected.
uint8_t FREQH ARG2 - Tune Frequency High byte.
uint8_t FREQL ARG3 - Tune Frequency Low byte.
uint8_t ANTCAPH ARG4 - Antenna Tuning Capacitor High byte.
uint8_t ANTCAPL ARG5 - Antenna Tuning Capacitor Low byte. Note used for FM.

◆ si47x_seek

union si47x_seek

Seek frequency (automatic tuning)

Represents searching for a valid frequency data type.

Data Fields
struct si47x_seek arg
uint8_t raw

◆ si47x_seek.arg

struct si47x_seek.arg
Data Fields
uint8_t RESERVED1: 2
uint8_t WRAP: 1 Determines whether the seek should Wrap = 1, or Halt = 0 when it hits the band limit.
uint8_t SEEKUP: 1 Determines the direction of the search, either UP = 1, or DOWN = 0.
uint8_t RESERVED2: 4

◆ si47x_status

union si47x_status

Status response data representation.

Represents searching for a valid frequency data type.

Data Fields
struct si47x_status refined
uint8_t raw

◆ si47x_status.refined

struct si47x_status.refined
Data Fields
uint8_t STCINT: 1 1 = Tune complete has been triggered.
uint8_t DUMMY1: 1 Reserved (Values may vary).
uint8_t RDSINT: 1 1 = Radio data system interrupt has been triggered.
uint8_t RSQINT: 1 1 = Received Signal Quality measurement has been triggered.
uint8_t DUMMY2: 2 Reserved (Values may vary).
uint8_t ERR: 1 1 = Error.
uint8_t CTS: 1 0 = Wait before sending next command; 1 = Clear to send next command.

◆ si47x_response_status

union si47x_response_status

Response status command.

Response data from a query status command

See also
Si47XX PROGRAMMING GUIDE; pages 73 and
Data Fields
struct si47x_response_status resp
uint8_t raw[8] Check it.

◆ si47x_response_status.resp

struct si47x_response_status.resp
Data Fields
uint8_t STCINT: 1 Seek/Tune Complete Interrupt; 1 = Tune complete has been triggered.
uint8_t DUMMY1: 1
uint8_t RDSINT: 1 Radio Data System (RDS) Interrup; 0 = interrupt has not been triggered.
uint8_t RSQINT: 1 Received Signal Quality Interrupt; 0 = interrupt has not been triggered.
uint8_t DUMMY2: 2
uint8_t ERR: 1 Error. 0 = No error 1 = Error.
uint8_t CTS: 1 Clear to Send.
uint8_t VALID: 1 Valid Channel.
uint8_t AFCRL: 1 AFC Rail Indicator.
uint8_t DUMMY3: 5
uint8_t BLTF: 1 Reports if a seek hit the band limit.
uint8_t READFREQH Read Frequency High byte.
uint8_t READFREQL Read Frequency Low byte.
uint8_t RSSI Received Signal Strength Indicator (dBμV)
uint8_t SNR This byte contains the SNR metric when tune is complete (dB).
uint8_t MULT Contains the multipath metric when tune is complete.
uint8_t READANTCAP Contains the current antenna tuning capacitor value.

◆ si47x_firmware_information

union si47x_firmware_information

Data representation for Firmware Information (GET_REV)

The part number, chip revision, firmware revision, patch revision and component revision numbers.

See also
Si47XX PROGRAMMING GUIDE; AN332; pages 66 and 131
Data Fields
struct si47x_firmware_information resp
uint8_t raw[9]

◆ si47x_firmware_information.resp

struct si47x_firmware_information.resp
Data Fields
uint8_t STCINT: 1
uint8_t DUMMY1: 1
uint8_t RDSINT: 1
uint8_t RSQINT: 1
uint8_t DUMMY2: 2
uint8_t ERR: 1
uint8_t CTS: 1
uint8_t PN RESP1 - Final 2 digits of Part Number (HEX).
uint8_t FWMAJOR RESP2 - Firmware Major Revision (ASCII).
uint8_t FWMINOR RESP3 - Firmware Minor Revision (ASCII).
uint8_t PATCHH RESP4 - Patch ID High byte (HEX).
uint8_t PATCHL RESP5 - Patch ID Low byte (HEX).
uint8_t CMPMAJOR RESP6 - Component Major Revision (ASCII).
uint8_t CMPMINOR RESP7 - Component Minor Revision (ASCII).
uint8_t CHIPREV RESP8 - Chip Revision (ASCII).

◆ si47x_firmware_query_library

union si47x_firmware_query_library

Firmware Query Library ID response.

Used to represent the response of a power up command with FUNC = 15 (patch)

To confirm that the patch is compatible with the internal device library revision, the library revision should be confirmed by issuing the POWER_UP command with Function = 15 (query library ID)

See also
Si47XX PROGRAMMING GUIDE; AN332; page 12
Data Fields
struct si47x_firmware_query_library resp
uint8_t raw[8]

◆ si47x_firmware_query_library.resp

struct si47x_firmware_query_library.resp
Data Fields
uint8_t STCINT: 1
uint8_t DUMMY1: 1
uint8_t RDSINT: 1
uint8_t RSQINT: 1
uint8_t DUMMY2: 2
uint8_t ERR: 1
uint8_t CTS: 1
uint8_t PN RESP1 - Final 2 digits of Part Number (HEX).
uint8_t FWMAJOR RESP2 - Firmware Major Revision (ASCII).
uint8_t FWMINOR RESP3 - Firmware Minor Revision (ASCII).
uint8_t RESERVED1 RESP4 - Reserved, various values.
uint8_t RESERVED2 RESP5 - Reserved, various values.
uint8_t CHIPREV RESP6 - Chip Revision (ASCII).
uint8_t LIBRARYID RESP7 - Library Revision (HEX).

◆ si47x_tune_status

union si47x_tune_status

Seek station status.

Status of FM_TUNE_FREQ or FM_SEEK_START commands or Status of AM_TUNE_FREQ or AM_SEEK_START commands.

See also
Si47XX PROGRAMMING GUIDE; AN332; pages 73 and 139
Data Fields
struct si47x_tune_status arg
uint8_t raw

◆ si47x_tune_status.arg

struct si47x_tune_status.arg
Data Fields
uint8_t INTACK: 1 If set, clears the seek/tune complete interrupt status indicator.
uint8_t CANCEL: 1 If set, aborts a seek currently in progress.
uint8_t RESERVED2: 6

◆ si47x_property

union si47x_property

Data type to deal with SET_PROPERTY command.

Property Data type (help to deal with SET_PROPERTY command on si473X)

Data Fields
struct si47x_property raw
uint16_t value

◆ si47x_property.raw

struct si47x_property.raw
Data Fields
uint8_t byteLow
uint8_t byteHigh