BA45F56xx Wireless Transceiver Application
AN0571EN V1.00
3 / 14
November 5, 2020
Sub-1GHz RF Transceiver supports 3-wire and 4-wire SPI interfaces. The 3-wire SPI only
requires CSN, SCK and SDIO while the 4-wire SPI requires CSN, SCK, SDIO and SDO. The
pin-shared function settings are shown in Table 1. The pull-up control for the RF Transceiver
communication pins are shown in Table 2.
When using either the 3-wire or 4-wire SPI to communicate with the RF Transceiver, users only
need to setup PB2 to be SCK to communicate with the RF Transceiver SCK. The SCK of other
I/O pins does not have this function. The PB2 pin is connected internally to the RF Transceiver
in the MCU, therefore no external connection is required.
The red frame in Figure 2 shows the RF Transceiver pins, SCK and GIO2. Note that they are
pin-shared with other pins. The remaining pins, such as GIO1 and GIO4, are dedicated RF
Transceiver pins.
For detailed register information, refer to the datasheet.
3-wire
4-wire
CSN
CSN
CSN
SCK
SCK(PBS0[5:4]=10)
SCK(PBS0[5:4] = 10)
SDIO
SDIO
SDIO
SDO
—
GIO2: PB3(PBS0[7:6] = 00 or 11), GIO2S[2:0] = 001
GIO1: GIO1S[2:0] = 001
GIO4: GIO4S[3:0] = 0001
Table 1. Communication Pin Settings
Register
Name
Description
SPIPU
3-wire SPI pull-up control: 0: Disable (output), 1: Enable (input)
GIOPU[4:1]
GIO pin function pull-up control: control the pull-up function of the GIO4~GIO1
pins respectively; 0: Disable (output), 1: Enable (input)
Table 2. Communication Pin Pull-up Control
Wireless Transmission Modes
There are two main wireless transmission modes in the wireless transceiver. These are the direct
mode, where the data to be transmitted and received is implemented on GIO1/GIO2 and the other
mode is the FIFO Mode, where data access is implemented using an internal FIFO register.
Direct Mode
The device will automatically load the default values after RF power on after which it will enter the
Deep Sleep Mode. To use the Direct Mode to transmit or receive data, use the following steps.
Step 1. Setup Parameters: Use the SPI interface to program the internal control registers. For example,
frequency (D_N, D_K), modulation parameter (FSCALE), data rate (DTR), etc. For parameter
setting details refer to the datasheet.
Step 2. Setup the synchronisation characters: Program the TXPMLEN and RXPMLEN registers to
setup the length of the preamble signal to be transmitted or received. This is implemented
using the SPI command, Write SYNCWORD (0x10) to set the synchronisation character.