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...
 
static bool RFCGetPaType (void)
 Get the type of currently selected PA. More...
 
static uint32_t RFCGetPaGain (void)
 Get the gain of currently selected PA. More...
 

Detailed Description

Function Documentation

static void RFCAckIntClear ( void  )
inlinestatic

Clear ACK interrupt flag.

Referenced by RFCDoorbellSendTo().

318 {
319  // Clear any pending interrupts.
320  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFACKIFG) = 0x0;
321 }
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
155 {
156  // Disable all clocks
157  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = 0x0;
158 }
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
130 {
131  // Enable basic clocks to get the CPE run
132  HWREG(RFC_PWR_NONBUF_BASE + RFC_PWR_O_PWMCLKEN) = RFC_PWR_PWMCLKEN_CPERAM
135 }
static void RFCCpe0IntSelect ( uint32_t  ui32Mask)
inlinestatic

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

Referenced by RFCCpe0IntSelectClearEnable().

194 {
195  // Multiplex RF Core interrupts to CPE0 IRQ.
196  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEISL) &= ~ui32Mask;
197 }
static void RFCCpe0IntSelectClearEnable ( uint32_t  ui32Mask)
inlinestatic

Select, clear, and enable interrupt sources to CPE0.

233 {
234  // Multiplex RF Core interrupts to CPE0 IRQ.
235  RFCCpe0IntSelect(ui32Mask);
236 
237  // Clear the masked interrupts.
238  RFCCpeIntClear(ui32Mask);
239 
240  // Enable the masked interrupts.
241  RFCCpeIntEnable(ui32Mask);
242 }
static void RFCCpeIntClear(uint32_t ui32Mask)
Clear HW interrupt flags.
Definition: rfc.h:167
static void RFCCpeIntEnable(uint32_t ui32Mask)
Enable CPEx interrupt sources.
Definition: rfc.h:219
static void RFCCpe0IntSelect(uint32_t ui32Mask)
Select interrupt sources to CPE0 (assign to INT_RFC_CPE_0 interrupt vector).
Definition: rfc.h:193

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

207 {
208  // Multiplex RF Core interrupts to CPE1 IRQ.
209  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEISL) |= ui32Mask;
210 }
static void RFCCpe1IntSelectClearEnable ( uint32_t  ui32Mask)
inlinestatic

Select, clear, and enable interrupt sources to CPE1.

252 {
253  // Multiplex RF Core interrupts to CPE1 IRQ.
254  RFCCpe1IntSelect(ui32Mask);
255 
256  // Clear the masked interrupts.
257  RFCCpeIntClear(ui32Mask);
258 
259  // Enable the masked interrupts.
260  RFCCpeIntEnable(ui32Mask);
261 }
static void RFCCpe1IntSelect(uint32_t ui32Mask)
Select interrupt sources to CPE1 (assign to INT_RFC_CPE_1 interrupt vector).
Definition: rfc.h:206
static void RFCCpeIntClear(uint32_t ui32Mask)
Clear HW interrupt flags.
Definition: rfc.h:167
static void RFCCpeIntEnable(uint32_t ui32Mask)
Enable CPEx interrupt sources.
Definition: rfc.h:219

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

168 {
169  // Clear the masked pending interrupts.
170  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIFG) = ~ui32Mask;
171 }
static void RFCCpeIntDisable ( uint32_t  ui32Mask)
inlinestatic

Disable CPE interrupt sources.

284 {
285  // Disable the masked interrupts
286  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIEN) &= ~ui32Mask;
287 }
static void RFCCpeIntEnable ( uint32_t  ui32Mask)
inlinestatic

Enable CPEx interrupt sources.

Referenced by RFCCpe0IntSelectClearEnable(), and RFCCpe1IntSelectClearEnable().

220 {
221  // Enable CPE interrupts from RF Core.
222  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFCPEIEN) |= ui32Mask;
223 }
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:167

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:317

Here is the call graph for this function:

static uint32_t RFCGetPaGain ( void  )
inlinestatic

Get the gain of currently selected PA.

390 {
391  return (HWREG(RFC_PA_GAIN_ADDRESS) & RFC_PA_GAIN_MASK);
392 }
#define RFC_PA_GAIN_ADDRESS
Definition: rfc.h:85
#define RFC_PA_GAIN_MASK
Definition: rfc.h:86
static bool RFCGetPaType ( void  )
inlinestatic

Get the type of currently selected PA.

379 {
380  return (bool)(HWREGB(RFC_PA_TYPE_ADDRESS) & RFC_PA_TYPE_MASK);
381 }
#define RFC_PA_TYPE_ADDRESS
Definition: rfc.h:83
#define RFC_PA_TYPE_MASK
Definition: rfc.h:84
static void RFCHwIntClear ( uint32_t  ui32Mask)
inlinestatic

Clear CPE interrupt flags.

Referenced by RFCHwIntGetAndClear().

181 {
182  // Clear the masked pending interrupts.
183  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIFG) = ~ui32Mask;
184 }
static void RFCHwIntDisable ( uint32_t  ui32Mask)
inlinestatic

Disable HW interrupt sources.

297 {
298  // Disable the masked interrupts
299  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIEN) &= ~ui32Mask;
300 }
static void RFCHwIntEnable ( uint32_t  ui32Mask)
inlinestatic

Enable HW interrupt sources.

271 {
272  // Enable the masked interrupts
273  HWREG(RFC_DBELL_BASE + RFC_DBELL_O_RFHWIEN) |= ui32Mask;
274 }
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:180

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:346
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
#define RFC_PA_GAIN_ADDRESS   0x2100034C

Referenced by RFCGetPaGain().

#define RFC_PA_GAIN_MASK   0x003FFFFF

Referenced by RFCGetPaGain().

#define RFC_PA_TYPE_ADDRESS   0x21000345

Referenced by RFCGetPaType().

#define RFC_PA_TYPE_MASK   0x04

Referenced by RFCGetPaType().