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 RFCOverrideSearch (const uint32_t *pOverride, const uint32_t pattern, const uint32_t mask, const uint8_t searchDepth)
 
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().

314 {
315  // Clear any pending interrupts.
316  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFACKIFG) = 0x0;
317 }
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
151 {
152  // Disable all clocks
153  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = 0x0;
154 }
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
126 {
127  // Enable basic clocks to get the CPE run
128  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM
131 }
static void RFCCpe0IntSelect ( uint32_t  ui32Mask)
inlinestatic

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

Referenced by RFCCpe0IntSelectClearEnable().

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

Select, clear, and enable interrupt sources to CPE0.

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

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().

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

Select, clear, and enable interrupt sources to CPE1.

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

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().

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

Disable CPE interrupt sources.

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

Enable CPEx interrupt sources.

Referenced by RFCCpe0IntSelectClearEnable(), and RFCCpe1IntSelectClearEnable().

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

Get and clear CPE interrupt flags.

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

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.

148 {
149  // Function is not complete
150 }
uint32_t RFCDoorbellSendTo ( uint32_t  pOp)

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

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

Here is the call graph for this function:

static void RFCHwIntClear ( uint32_t  ui32Mask)
inlinestatic

Clear CPE interrupt flags.

Referenced by RFCHwIntGetAndClear().

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

Disable HW interrupt sources.

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

Enable HW interrupt sources.

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

Get and clear HW interrupt flags.

197 {
198  // Read the CPE interrupt flags which match the provided bitmask
199  uint32_t ui32Ifg = HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIFG) & ui32Mask;
200 
201  // Clear the interupt flags
202  RFCHwIntClear(ui32Ifg);
203 
204  // Return with the interrupt flags
205  return (ui32Ifg);
206 }
static void RFCHwIntClear(uint32_t ui32Mask)
Clear CPE interrupt flags.
Definition: rfc.h:176

Here is the call graph for this function:

uint8_t RFCOverrideSearch ( const uint32_t *  pOverride,
const uint32_t  pattern,
const uint32_t  mask,
const uint8_t  searchDepth 
)
160 {
161  // Search from start of the override list, to look for first override entry that matches search pattern
162  uint8_t override_index;
163  for(override_index = 0; (override_index < searchDepth) && (pOverride[override_index] != END_OVERRIDE); override_index++)
164  {
165  // Compare the value to the given pattern
166  if((pOverride[override_index] & mask) == pattern)
167  {
168  // Return with the index of override in case of match
169  return override_index;
170  }
171  }
172 
173  // Return with an invalid index
174  return 0xFF;
175 }
#define END_OVERRIDE
End of string for override register.
Definition: rf_mailbox.h:331
uint8_t RFCOverrideUpdate ( rfc_radioOp_t pOpSetup,
uint32_t *  pParams 
)

Function to update override list.

184 {
185  // Function is not complete
186  return 0;
187 }
void RFCSynthPowerDown ( void  )

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

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

Macro Definition Documentation

#define RFC_MAX_SEARCH_DEPTH   5