CC26xx Driver Library
RF Core

Data Structures

struct  rfTrim_t
 

Functions

static void RFCClockEnable (void)
 Enable the RF core clocks. More...
 
static void RFCClockDisable (void)
 Disable the RF core clocks. More...
 
static void RFCCpeIntClear (uint32_t ui32Mask)
 Clear HW interrupt flags. More...
 
static void RFCHwIntClear (uint32_t ui32Mask)
 Clear CPE interrupt flags. More...
 
static void RFCCpe0IntSelect (uint32_t ui32Mask)
 Select interrupt sources to CPE0 (assign to INT_RFC_CPE_0 interrupt vector). More...
 
static void RFCCpe1IntSelect (uint32_t ui32Mask)
 Select interrupt sources to CPE1 (assign to INT_RFC_CPE_1 interrupt vector). More...
 
static void RFCCpeIntEnable (uint32_t ui32Mask)
 Enable CPEx interrupt sources. More...
 
static void RFCCpe0IntSelectClearEnable (uint32_t ui32Mask)
 Select, clear, and enable interrupt sources to CPE0. More...
 
static void RFCCpe1IntSelectClearEnable (uint32_t ui32Mask)
 Select, clear, and enable interrupt sources to CPE1. More...
 
static void RFCHwIntEnable (uint32_t ui32Mask)
 Enable HW interrupt sources. More...
 
static void RFCCpeIntDisable (uint32_t ui32Mask)
 Disable CPE interrupt sources. More...
 
static void RFCHwIntDisable (uint32_t ui32Mask)
 Disable HW interrupt sources. More...
 
uint32_t RFCCpeIntGetAndClear (uint32_t ui32Mask)
 Get and clear CPE interrupt flags. More...
 
static void RFCAckIntClear (void)
 Clear ACK interrupt flag. More...
 
uint32_t RFCDoorbellSendTo (uint32_t pOp)
 Send a radio operation to the doorbell and wait for an acknowledgment. More...
 
void RFCSynthPowerDown (void)
 This function implements a fast way to turn off the synthesizer. More...
 
void RFCCpePatchReset (void)
 Reset previously patched CPE RAM to a state where it can be patched again. More...
 
uint8_t RFCOverrideUpdate (rfc_radioOp_t *pOpSetup, uint32_t *pParams)
 Function to update override list. More...
 
uint32_t RFCHwIntGetAndClear (uint32_t ui32Mask)
 Get and clear HW interrupt flags. More...
 

Detailed Description

Function Documentation

static void RFCAckIntClear ( void  )
inlinestatic

Clear ACK interrupt flag.

Referenced by RFCDoorbellSendTo().

313 {
314  // Clear any pending interrupts.
315  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFACKIFG) = 0x0;
316 }
static void RFCClockDisable ( void  )
inlinestatic

Disable the RF core clocks.

As soon as the RF core is started it will handle clock control autonomously. No check should be performed to check the clocks. Instead the radio can be ping'ed through the command interface.

When disabling clocks it is the programmers responsibility that the RF core clocks are safely gated. I.e. the RF core should be safely 'parked'.

Returns
None
150 {
151  // Disable all clocks
152  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = 0x0;
153 }
static void RFCClockEnable ( void  )
inlinestatic

Enable the RF core clocks.

As soon as the RF core is started it will handle clock control autonomously. No check should be performed to check the clocks. Instead the radio can be ping'ed through the command interface.

Returns
None
125 {
126  // Enable basic clocks to get the CPE run
127  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM
130 }
static void RFCCpe0IntSelect ( uint32_t  ui32Mask)
inlinestatic

Select interrupt sources to CPE0 (assign to INT_RFC_CPE_0 interrupt vector).

Referenced by RFCCpe0IntSelectClearEnable().

189 {
190  // Multiplex RF Core interrupts to CPE0 IRQ.
191  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEISL) &= ~ui32Mask;
192 }
static void RFCCpe0IntSelectClearEnable ( uint32_t  ui32Mask)
inlinestatic

Select, clear, and enable interrupt sources to CPE0.

228 {
229  // Multiplex RF Core interrupts to CPE0 IRQ.
230  RFCCpe0IntSelect(ui32Mask);
231 
232  // Clear the masked interrupts.
233  RFCCpeIntClear(ui32Mask);
234 
235  // Enable the masked interrupts.
236  RFCCpeIntEnable(ui32Mask);
237 }
static void RFCCpeIntClear(uint32_t ui32Mask)
Clear HW interrupt flags.
Definition: rfc.h:162
static void RFCCpeIntEnable(uint32_t ui32Mask)
Enable CPEx interrupt sources.
Definition: rfc.h:214
static void RFCCpe0IntSelect(uint32_t ui32Mask)
Select interrupt sources to CPE0 (assign to INT_RFC_CPE_0 interrupt vector).
Definition: rfc.h:188

Here is the call graph for this function:

static void RFCCpe1IntSelect ( uint32_t  ui32Mask)
inlinestatic

Select interrupt sources to CPE1 (assign to INT_RFC_CPE_1 interrupt vector).

Referenced by RFCCpe1IntSelectClearEnable().

202 {
203  // Multiplex RF Core interrupts to CPE1 IRQ.
204  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEISL) |= ui32Mask;
205 }
static void RFCCpe1IntSelectClearEnable ( uint32_t  ui32Mask)
inlinestatic

Select, clear, and enable interrupt sources to CPE1.

247 {
248  // Multiplex RF Core interrupts to CPE1 IRQ.
249  RFCCpe1IntSelect(ui32Mask);
250 
251  // Clear the masked interrupts.
252  RFCCpeIntClear(ui32Mask);
253 
254  // Enable the masked interrupts.
255  RFCCpeIntEnable(ui32Mask);
256 }
static void RFCCpe1IntSelect(uint32_t ui32Mask)
Select interrupt sources to CPE1 (assign to INT_RFC_CPE_1 interrupt vector).
Definition: rfc.h:201
static void RFCCpeIntClear(uint32_t ui32Mask)
Clear HW interrupt flags.
Definition: rfc.h:162
static void RFCCpeIntEnable(uint32_t ui32Mask)
Enable CPEx interrupt sources.
Definition: rfc.h:214

Here is the call graph for this function:

static void RFCCpeIntClear ( uint32_t  ui32Mask)
inlinestatic

Clear HW interrupt flags.

Referenced by RFCCpe0IntSelectClearEnable(), RFCCpe1IntSelectClearEnable(), and RFCCpeIntGetAndClear().

163 {
164  // Clear the masked pending interrupts.
165  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) = ~ui32Mask;
166 }
static void RFCCpeIntDisable ( uint32_t  ui32Mask)
inlinestatic

Disable CPE interrupt sources.

279 {
280  // Disable the masked interrupts
281  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIEN) &= ~ui32Mask;
282 }
static void RFCCpeIntEnable ( uint32_t  ui32Mask)
inlinestatic

Enable CPEx interrupt sources.

Referenced by RFCCpe0IntSelectClearEnable(), and RFCCpe1IntSelectClearEnable().

215 {
216  // Enable CPE interrupts from RF Core.
217  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIEN) |= ui32Mask;
218 }
uint32_t RFCCpeIntGetAndClear ( uint32_t  ui32Mask)

Get and clear CPE interrupt flags.

73 {
74  // Read the CPE interrupt flags which match the provided bitmask
75  uint32_t ui32Ifg = HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) & ui32Mask;
76 
77  // Clear the interrupt flags
78  RFCCpeIntClear(ui32Ifg);
79 
80  // Return with the interrupt flags
81  return (ui32Ifg);
82 }
static void RFCCpeIntClear(uint32_t ui32Mask)
Clear HW interrupt flags.
Definition: rfc.h:162

Here is the call graph for this function:

void RFCCpePatchReset ( void  )

Reset previously patched CPE RAM to a state where it can be patched again.

146 {
147  // Function is not complete
148 }
uint32_t RFCDoorbellSendTo ( uint32_t  pOp)

Send a radio operation to the doorbell and wait for an acknowledgment.

92 {
93  // Wait until the doorbell becomes available
94  while(HWREG(RFC_DBELL_BASE + RFC_DBELL_O_CMDR) != 0);
96 
97  // Submit the command to the CM0 through the doorbell
98  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_CMDR) = pOp;
99 
100  // Wait until the CM0 starts to parse the command
101  while(!HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFACKIFG));
102  RFCAckIntClear();
103 
104  // Return with the content of status register
105  return(HWREG(RFC_DBELL_BASE + RFC_DBELL_O_CMDSTA));
106 }
static void RFCAckIntClear(void)
Clear ACK interrupt flag.
Definition: rfc.h:312

Here is the call graph for this function:

static void RFCHwIntClear ( uint32_t  ui32Mask)
inlinestatic

Clear CPE interrupt flags.

Referenced by RFCHwIntGetAndClear().

176 {
177  // Clear the masked pending interrupts.
178  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIFG) = ~ui32Mask;
179 }
static void RFCHwIntDisable ( uint32_t  ui32Mask)
inlinestatic

Disable HW interrupt sources.

292 {
293  // Disable the masked interrupts
294  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIEN) &= ~ui32Mask;
295 }
static void RFCHwIntEnable ( uint32_t  ui32Mask)
inlinestatic

Enable HW interrupt sources.

266 {
267  // Enable the masked interrupts
268  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIEN) |= ui32Mask;
269 }
uint32_t RFCHwIntGetAndClear ( uint32_t  ui32Mask)

Get and clear HW interrupt flags.

169 {
170  // Read the CPE interrupt flags which match the provided bitmask
171  uint32_t ui32Ifg = HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIFG) & ui32Mask;
172 
173  // Clear the interupt flags
174  RFCHwIntClear(ui32Ifg);
175 
176  // Return with the interrupt flags
177  return (ui32Ifg);
178 }
static void RFCHwIntClear(uint32_t ui32Mask)
Clear CPE interrupt flags.
Definition: rfc.h:175

Here is the call graph for this function:

uint8_t RFCOverrideUpdate ( rfc_radioOp_t pOpSetup,
uint32_t *  pParams 
)

Function to update override list.

156 {
157  // Function is not complete
158  return 0;
159 }
void RFCSynthPowerDown ( void  )

This function implements a fast way to turn off the synthesizer.

116 {
117  // Definition of reserved words
118  const uint32_t RFC_RESERVED0 = 0x40046054;
119  const uint32_t RFC_RESERVED1 = 0x40046060;
120  const uint32_t RFC_RESERVED2 = 0x40046058;
121  const uint32_t RFC_RESERVED3 = 0x40044100;
122 
123  // Disable CPE clock, enable FSCA clock.
124  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = (HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN)
126 
127  HWREG(RFC_RESERVED0) = 3;
128  HWREG(RFC_RESERVED1) = 0x1030;
129  HWREG(RFC_RESERVED2) = 1;
130  HWREG(RFC_RESERVED1) = 0x50;
131  HWREG(RFC_RESERVED2) = 1;
132  HWREG(RFC_RESERVED1) = 0x650;
133  HWREG(RFC_RESERVED2) = 1;
134  HWREG(RFC_RESERVED1) = 0x10C0;
135  HWREG(RFC_RESERVED2) = 1;
136  HWREG(RFC_RESERVED3) = 1;
137 }

Macro Definition Documentation

#define RFC_MAX_SEARCH_DEPTH   5