A N 6 9 2
Rev 0.4
61
5.4.4. Programmable Counter Array Module
The PCA related source files, called 'pca.h' and 'pca.c', can be found in the /src/driver/ folder. The module initializes
the PCA to create beeping sounds on the buzzer. The time-base source of the PCA counter can be selected.
Interrupts can be generated when the lower byte of the counter overflows. PWM-mod cycle length can be also
selected to modify the frequency of the tweeting sound.
5.4.5. Serial Peripheral Interface Module
The SPI related source files, called 'spi.h' and 'spi.c', can be found in the /src/driver/ folder. This module is the most
essential, because it makes it possible to connect to the radio via the SPI bus. The radio can be controlled by its
built-in application programming interface. This control is based on sending commands towards the API and
receiving responses from the API. To enable the SPI interface, the SPI port must be enabled and associated to the
crossbar. The directions of the SCK, MISO, and MOSI ports have to be configured properly on the IO port. Finally,
the default states of the pins have to be set correctly. Since several devices can be connected to the same SPI bus,
the NSEL pin of the selected device is activated during communication. Since the commands to be sent to the API
are sequences of bytes, the module has to be able to send and receive continuous byte streams. There are some
cases when either reading a single byte directly from the MISO or writing specified number of bits directly to the
MOSI is necessary. In order to cover these kinds of cases, bitbang read/write methods have been also
implemented.
Function Name:
void
vPca_InitPcaTmr
(U8 biPulseSelect, U8 biPcaTmrItEnable, U8 biCy-
cleLengthSelect)
Description:
This function is used to start Timer 2 in the specified mode.
Input Parameter(s):
biPulseSelect : Selects time-base source of PCA counter
(use predefined constants: bPca_PcaCps_000_c etc.)
biPcaTmrItEnable : Enables PCA timer IT if TRUE, disables it if FALSE
biCycleLengthSelect:PWM-mode cycle length select
(use predefined constants : bPca_PwmClsel_00_c etc.)
Return Value
None
Function Name:
U8
bSpi_ReadWriteSpi0
(U8 biDataIn)
Description:
This function is used to read/write one byte from/to SPI0.
Input Parameter(s):
biDataIn : Data to be sent.
Return Value:
Read value of the SPI port after writing on it.
Function Name:
U8
bSpi_ReadWriteSpi1
(U8 biDataIn)
Description:
This function is used to read/write one byte from/to SPI1.
Input parameter(s):
biDataIn : Data to be sent.
Return Value:
Read value of the SPI port after writing on it.
Summary of Contents for Si4455 Series
Page 8: ...AN692 8 Rev 0 4 Figure 6 Device Configuration Options ...
Page 22: ...AN692 22 Rev 0 4 Figure 21 Supply Current versus Time Diagram from Shutdown to RX State ...
Page 23: ...AN692 Rev 0 4 23 4 4 Radio Chip Waking Up Figure 22 Radio Wake Up Process ...
Page 35: ...AN692 Rev 0 4 35 Figure 32 Transmission Flowchart ...
Page 39: ...AN692 Rev 0 4 39 Figure 33 Reception Flowchart ...
Page 41: ...AN692 Rev 0 4 41 Figure 34 Bidirectional Variable Packet Example Project Flowchart ...
Page 47: ...AN692 Rev 0 4 47 Figure 41 Long Packet Transmission Flowchart ...
Page 48: ...AN692 48 Rev 0 4 Figure 42 Long Packet RX Flowchart ...