CC26xx Driver Library
[aon_ioc.h] AON I/O Controller

Functions

static void AONIOCDriveStrengthSet (uint32_t ui32DriveLevel, uint32_t ui32DriveStrength)
 Configure drive strength values for the manual drive strength options. More...
 
static uint32_t AONIOCDriveStrengthGet (uint32_t ui32DriveLevel)
 Get a specific drive level setting for all IOs. More...
 
static void AONIOCFreezeEnable (void)
 Freeze the IOs. More...
 
static void AONIOCFreezeDisable (void)
 Un-freeze the IOs. More...
 
static void AONIOC32kHzOutputDisable (void)
 Disable the 32kHz clock output. More...
 
static void AONIOC32kHzOutputEnable (void)
 Enable the 32kHz clock output. More...
 

Detailed Description

Introduction

The Input/Output Controller (IOC) controls the functionality of the pins (called DIO). The IOC consists of two APIs:

For more information on the MCU IOC see the IOC API.

API

The API functions can be grouped like this:

Freeze IOs while MCU domain is powered down:

Output LF clock to a DIO:

Configure the value of drive strength for the three manual MCU IOC settings (MIN, MED, MAX):

Function Documentation

static void AONIOC32kHzOutputDisable ( void  )
inlinestatic

Disable the 32kHz clock output.

When outputting a 32 kHz clock on an IO, the output enable/disable functionality in the IOC is bypassed. Therefore, the programmer needs to call this function to disable the clock output.

Returns
None
See also
AONIOC32kHzOutputEnable()
250 {
251  // Disable the LF clock output.
253 }
static void AONIOC32kHzOutputEnable ( void  )
inlinestatic

Enable the 32kHz clock output.

When outputting a 32 kHz clock on an IO, the output enable/disable functionality in the IOC is bypassed. Therefore, the programmer needs to call this function to enable the clock output.

Returns
None
See also
AONIOC32kHzOutputDisable()
270 {
271  // Enable the LF clock output.
272  HWREG(AON_IOC_BASE + AON_IOC_O_CLK32KCTL) = 0x0;
273 }
static uint32_t AONIOCDriveStrengthGet ( uint32_t  ui32DriveLevel)
inlinestatic

Get a specific drive level setting for all IOs.

Use this function to read the drive strength setting for a specific IO drive level.

Note
Values are Gray encoded.
Parameters
ui32DriveLevelis the specific drive level to get the setting for.
Returns
Returns the requested drive strength level setting for all IOs. Possible values are:
See also
AONIOCDriveStrengthSet()
182 {
183  // Check the arguments.
184  ASSERT((ui32DriveLevel == AONIOC_DRV_LVL_MIN) ||
185  (ui32DriveLevel == AONIOC_DRV_LVL_MED) ||
186  (ui32DriveLevel == AONIOC_DRV_LVL_MAX));
187 
188  // Return the drive strength value.
189  return( HWREG(AON_IOC_BASE + ui32DriveLevel) );
190 }
#define AONIOC_DRV_LVL_MIN
Definition: aon_ioc.h:83
#define AONIOC_DRV_LVL_MAX
Definition: aon_ioc.h:85
#define ASSERT(expr)
Definition: debug.h:73
#define AONIOC_DRV_LVL_MED
Definition: aon_ioc.h:84
static void AONIOCDriveStrengthSet ( uint32_t  ui32DriveLevel,
uint32_t  ui32DriveStrength 
)
inlinestatic

Configure drive strength values for the manual drive strength options.

This function defines the general drive strength settings for the non-AUTO drive strength options in the MCU IOC. Consequently, if all IOs are using the automatic drive strength option this function has no effect.

Changing the drive strength values affects all current modes (Low-Current, High-Current, and Extended-Current). Current mode for individual IOs is set in MCU IOC by IOCIODrvStrengthSet().

Note
Values are Gray encoded. Simply incrementing values to increase drive strength will not work.
Parameters
ui32DriveLevel
  • AONIOC_DRV_LVL_MIN : Minimum drive strength option. Default value is selected to give minimum 2/4/8 mA @3.3V for Low-Current mode, High-Current mode, and Extended-Current mode respectively.
  • AONIOC_DRV_LVL_MED : Medium drive strength option. Default value is selected to give minimum 2/4/8 mA @2.5V for Low-Current mode, High-Current mode, and Extended-Current mode respectively.
  • AONIOC_DRV_LVL_MAX : Maximum drive strength option. Default value is selected to give minimum 2/4/8 mA @1.8V for Low-Current mode, High-Current mode, and Extended-Current mode respectively.
ui32DriveStrengthsets the value used by IOs configured as non-AUTO drive strength in MCU IOC.
Returns
None
See also
AONIOCDriveStrengthGet(), IOCIODrvStrengthSet()
135 {
136  ASSERT((ui32DriveLevel == AONIOC_DRV_LVL_MIN) ||
137  (ui32DriveLevel == AONIOC_DRV_LVL_MED) ||
138  (ui32DriveLevel == AONIOC_DRV_LVL_MAX));
139  ASSERT((ui32DriveStrength == AONIOC_DRV_STR_1) ||
140  (ui32DriveStrength == AONIOC_DRV_STR_2) ||
141  (ui32DriveStrength == AONIOC_DRV_STR_3) ||
142  (ui32DriveStrength == AONIOC_DRV_STR_4) ||
143  (ui32DriveStrength == AONIOC_DRV_STR_5) ||
144  (ui32DriveStrength == AONIOC_DRV_STR_6) ||
145  (ui32DriveStrength == AONIOC_DRV_STR_7) ||
146  (ui32DriveStrength == AONIOC_DRV_STR_8));
147 
148  // Set the drive strength.
149  HWREG(AON_IOC_BASE + ui32DriveLevel) = ui32DriveStrength;
150 }
#define AONIOC_DRV_STR_3
Definition: aon_ioc.h:76
#define AONIOC_DRV_STR_5
Definition: aon_ioc.h:78
#define AONIOC_DRV_LVL_MIN
Definition: aon_ioc.h:83
#define AONIOC_DRV_STR_4
Definition: aon_ioc.h:77
#define AONIOC_DRV_STR_1
Definition: aon_ioc.h:74
#define AONIOC_DRV_LVL_MAX
Definition: aon_ioc.h:85
#define AONIOC_DRV_STR_6
Definition: aon_ioc.h:79
#define AONIOC_DRV_STR_8
Definition: aon_ioc.h:81
#define ASSERT(expr)
Definition: debug.h:73
#define AONIOC_DRV_LVL_MED
Definition: aon_ioc.h:84
#define AONIOC_DRV_STR_2
Definition: aon_ioc.h:75
#define AONIOC_DRV_STR_7
Definition: aon_ioc.h:80
static void AONIOCFreezeDisable ( void  )
inlinestatic

Un-freeze the IOs.

When rebooting the chip after it has entered powerdown/shutdown mode, the software can regain control of the IOs by setting the IO latches as transparent. The IOs should not be unfrozen before software has restored the functionality of the IO.

Returns
None
See also
AONIOCFreezeEnable()
230 {
231  // Set the AON IOC latches as transparent.
232  HWREG(AON_IOC_BASE + AON_IOC_O_IOCLATCH) = AON_IOC_IOCLATCH_EN;
233 }
static void AONIOCFreezeEnable ( void  )
inlinestatic

Freeze the IOs.

To retain the values of the output IOs during a powerdown/shutdown of the device all IO latches in the AON domain should be frozen in their current state. This ensures that software can regain control of the IOs after a reboot without the IOs first falling back to the default values (i.e. input and no pull).

Returns
None
See also
AONIOCFreezeDisable()

Referenced by SysCtrlStandby().

209 {
210  // Set the AON IO latches as static.
211  HWREG(AON_IOC_BASE + AON_IOC_O_IOCLATCH) = 0x0;
212 }

Macro Definition Documentation

#define AONIOC_DRV_LVL_MAX   (AON_IOC_O_IOSTRMAX)
#define AONIOC_DRV_LVL_MED   (AON_IOC_O_IOSTRMED)
#define AONIOC_DRV_LVL_MIN   (AON_IOC_O_IOSTRMIN)
#define AONIOC_DRV_STR_1   0x00000000

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_2   0x00000001

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_3   0x00000003

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_4   0x00000002

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_5   0x00000006

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_6   0x00000007

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_7   0x00000005

Referenced by AONIOCDriveStrengthSet().

#define AONIOC_DRV_STR_8   0x00000004

Referenced by AONIOCDriveStrengthSet().