![Silicon Laboratories Si4012 Programming Manual Download Page 8](http://html1.mh-extra.com/html/silicon-laboratories/si4012/si4012_programming-manual_1272046008.webp)
A N 7 4 6
8
Rev. 0.1
Si4012_Status = SetProperty(C_CHIP_CONFIG, 3);
Si4012_Status = SetProperty(C_MODULATION_FSKDEV, 4);
//
Si4012_Status = SetProperty(C_TUNE_INTERVAL, 4);
//
Si4012_Status = SetProperty(C_FIFO_THRESHOLD, 5);
//
Si4012_Status = SetProperty(C_BITRATE_CONFIG, 5);
Si4012_Status = SetProperty(C_TX_FREQ, 6);
//
Si4012_Status = SetProperty(C_LBD_CONFIG, 6);
//
Si4012_Status = SetProperty(C_XO_CONFIG, 7);
//
Si4012_Status = SetProperty(C_PA_CONFIG, 8);
//-----------------------------------------------------------------------
U8 SetProperty(U8 * command, U8 clenght)
{
SmbusStatus = SMBusWrite(SI4012_SLAVE_ADDRESS, clenght, command);
SmbusStatus = SMBusRead(SI4012_SLAVE_ADDRESS, 1, &error);
return error;
}
Because properties are initialized to a default value by the reset process after a power on or wakeup from
shutdown, the user has to initialize a property only if its desired value is different from its default value. For this
reason, some SetProperty calls are commented out in the code above to save time and battery power.
4.3. Interrupt Handling
The NIRQ pin of the Si4012 is used to issue interrupts to the host. The host should poll the NIRQ pin or use
interrupts (NIRQ) to get interrupt status. The host can then read the interrupt status of the radio with
GET_INT_STATUS command that also clears the interrupts at the same time. The GET_INT_STATUS command
is also useful for polling the interrupt status of the Si4012 via the SMBus interface when the NIRQ pin is not
connected.
4.4. How to Send a Packet Longer than 255 Bytes
The Si4012 device has a 255-byte transmit FIFO; however, it is possible to transmit longer packets than 255 bytes.
The FIFO in the Si4012 has two programmable thresholds and the chip can provide interrupts when the data in the
transmit FIFO reaches these thresholds. The first threshold is the FIFO Almost Full Threshold. If the number of
bytes filled into the FIFO reaches this level, then the radio can provide an interrupt for the MCU to start the packet
transmission. The second threshold is the FIFO Almost Empty Threshold. If the number of bytes in the transmit
FIFO reaches this level, then the radio can provide an interrupt for the MCU. Then the microcontroller will need to
fill more data into the transmit FIFO to avoid FIFO underflow.
Summary of Contents for Si4012
Page 14: ...AN746 14 Rev 0 1...
Page 18: ...AN746 18 Rev 0 1...
Page 29: ...AN746 Rev 0 1 29 NOTES...