Routing RF core signals to physical pins¶
The various hardware units on the RF core provide 12 internal hardware signals that indicate various events. These signals are defined in Table 8.. Not all signals are documented, though.
Index | Signal identifier | Default mapping | Description |
---|---|---|---|
0 | CPE_GPO0 | RFC_GPO0 | Controls an external LNA front-end. High when the LNA must be enabled, otherwise low. |
1 | CPE_GPO1 | RFC_GPO1 | Controls an external PA. High when the PA must be enabled and otherwise low. |
2 | CPE_GPO2 | RFC_GPO2 | Goes high when the synthesizer calibration starts and low when the calibration is done. |
3 | CPE_GPO3 | n/a | |
4 | MCE_GPO0 | Binary data signal that goes to the modulator when sending. | |
5 | MCE_GPO1 | Binary data signal that comes from the demodulator when receiving. | |
6 | MCE_GPO2 | n/a | |
7 | MCE_GPO3 | n/a | |
8 | RAT_GPO0 | RFC_GPO3 | Goes high when a transmission is initiated and low when the transmission is done. Can be used for accurate timing synchronization. |
9 | RAT_GPO1 | Goes high when sync word is detected and low either when the packet has been received or reception has been aborted. Not available for IEEE 802.15.4 RX commands. Requires an additional override (uint32_t)0x008F88B3 |
|
10 | RAT_GPO2 | General purpose RAT output. Configurable via CMD_SET_RAT_OUTPUT. | |
11 | RAT_GPO3 | General purpose RAT output. Configurable via CMD_SET_RAT_OUTPUT. |
Each of those 12 signals can be routed to any physical GPIO pin via the RF
core doorbell register SYSGPOCTL
. The doorbell register provides 4
outputs: RFC_GPO0
.. RFC_GPO3
. This means that at most 4 output
signals from Table 8. can be used at the same time. The
signals RFC_GPO0
.. RFC_GPO3
have a default mapping on power up.
In addition, the RF core provides two input signals: RFC_GPI0
and
RFC_GPI1
. These are tied to the radio timer on the RF core and can be
used, for instance, to trigger an RF operation command. For a usage example,
please refer to External triggers TRIG_EXTERNAL.
Routing internal signals to the doorbell register¶
The default mapping from Table 8. can be changed by
writing to the SYSGPOCTL
register. For instance, to map RAT_GPO2 => RFC_GPO0
and
MCE_GPO0 => RFC_GPO1
, use the following code snippet:
#include <ti/devices/${DEVICE_FAMILY}/inc/hw_rfc_dbell.h>
// Map RAT_GPO2 to RFC_GPO0
// Map MCE_GPO0 to RFC_GPO1
HWREG(RFC_DBELL_BASE + RFC_DBELL_O_SYSGPOCTL) =
RFC_DBELL_SYSGPOCTL_GPOCTL0_RATGPO2 | RFC_DBELL_SYSGPOCTL_GPOCTL1_MCEGPO0;
Please note that this can only be done when the RF core is powered up. The signal mapping on the RF core is reset on each power-up cycle. In order to apply a custom mapping automatically during power-up, apply the register change via an override instead:
#include <ti/devices/${DEVICE_FAMILY]/inc/hw_rfc_dbell.h>
// Overrides for CMD_PROP_RADIO_DIV_SETUP
static uint32_t pOverrides[] =
{
// Set the SYSGPOCTL register
HW_REG_OVERRIDE(0x1110, RFC_DBELL_SYSGPOCTL_GPOCTL0_RATGPO2 | RFC_DBELL_SYSGPOCTL_GPOCTL1_MCEGPO0),
// ...
}
Routing doorbell signals to GPIO pins¶
After the signal mapping has been established on the RF core, the doorbell GPIO signal can be routed to a physical pin or vice versa by the help of the PIN driver:
#include <ti/drivers/pin/PINCC26XX.h>
// Map RFC_GPO0 to IO 23
PINCC26XX_setMux(pinHandle, IOID_23, PINCC26XX_MUX_RFC_GPO0);
// Map IO 26 to RFC_GPI1
PINCC26XX_setMux(pinHandle, IOID_26, PINCC26XX_MUX_RFC_GPI1);
This mapping is permanent as long as the GPIO driver is initialized correctly.