MotorWare f2806x Driver API Documentation

- Main Page
- Modules
- Data Structures
- Files

Data Structures | Macros | Typedefs | Enumerations | Functions
PWR

## Data Structures
struct | _PWR_Obj_
| Defines the power (PWR) object. More...

## Macros
#define | PWR_BASE_ADDR (0x00000985)
| Defines the base address of the power (PWR) registers. More...
#define | PWR_BORCFG_BORENZ_BITS (1 << 0)
| Defines the location of the BORENZ bits in the BORCFG register. More...
#define | PWR_LPMCR0_LPM_BITS (3 << 0)
| Defines the location of the LPM bits in the LPMCR0 register. More...
#define | PWR_LPMCR0_QUALSTDBY_BITS (63 << 2)
| Defines the location of the QUALSTDBY bits in the LPMCR0 register. More...
#define | PWR_LPMCR0_WDINTE_BITS (1 << 15)
| Defines the location of the WDINTE bits in the LPMCR0 register. More...

## Typedefs
typedef struct _PWR_Obj_ | PWR_Obj
| Defines the power (PWR) object. More...
typedef struct _PWR_Obj_ * | PWR_Handle
| Defines the power (PWR) handle. More...

## Enumerations
enum | PWR_LowPowerMode_e { PWR_LowPowerMode_Idle =0, PWR_LowPowerMode_Standby, PWR_LowPowerMode_Halt }
| Enumeration to define the power (PWR) low power modes. More...
enum | PWR_NumStandByClocks_e { PWR_NumStandByClocks_2 =(0 << 2), PWR_NumStandByClocks_3 =(1 << 2), PWR_NumStandByClocks_4 =(2 << 2), PWR_NumStandByClocks_5 =(3 << 2), PWR_NumStandByClocks_6 =(4 << 2), PWR_NumStandByClocks_7 =(5 << 2), PWR_NumStandByClocks_8 =(6 << 2), PWR_NumStandByClocks_9 =(7 << 2), PWR_NumStandByClocks_10 =(8 << 2), PWR_NumStandByClocks_11 =(9 << 2), PWR_NumStandByClocks_12 =(10 << 2), PWR_NumStandByClocks_13 =(11 << 2), PWR_NumStandByClocks_14 =(12 << 2), PWR_NumStandByClocks_15 =(13 << 2), PWR_NumStandByClocks_16 =(14 << 2), PWR_NumStandByClocks_17 =(15 << 2), PWR_NumStandByClocks_18 =(16 << 2), PWR_NumStandByClocks_19 =(17 << 2), PWR_NumStandByClocks_20 =(18 << 2), PWR_NumStandByClocks_21 =(19 << 2), PWR_NumStandByClocks_22 =(20 << 2), PWR_NumStandByClocks_23 =(21 << 2), PWR_NumStandByClocks_24 =(22 << 2), PWR_NumStandByClocks_25 =(23 << 2), PWR_NumStandByClocks_26 =(24 << 2), PWR_NumStandByClocks_27 =(25 << 2), PWR_NumStandByClocks_28 =(26 << 2), PWR_NumStandByClocks_29 =(27 << 2), PWR_NumStandByClocks_30 =(28 << 2), PWR_NumStandByClocks_31 =(29 << 2), PWR_NumStandByClocks_32 =(30 << 2), PWR_NumStandByClocks_33 =(31 << 2), PWR_NumStandByClocks_34 =(32 << 2), PWR_NumStandByClocks_35 =(33 << 2), PWR_NumStandByClocks_36 =(34 << 2), PWR_NumStandByClocks_37 =(35 << 2), PWR_NumStandByClocks_38 =(36 << 2), PWR_NumStandByClocks_39 =(37 << 2), PWR_NumStandByClocks_40 =(38 << 2), PWR_NumStandByClocks_41 =(39 << 2), PWR_NumStandByClocks_42 =(40 << 2), PWR_NumStandByClocks_43 =(41 << 2), PWR_NumStandByClocks_44 =(42 << 2), PWR_NumStandByClocks_45 =(43 << 2), PWR_NumStandByClocks_46 =(44 << 2), PWR_NumStandByClocks_47 =(45 << 2), PWR_NumStandByClocks_48 =(46 << 2), PWR_NumStandByClocks_49 =(47 << 2), PWR_NumStandByClocks_50 =(48 << 2), PWR_NumStandByClocks_51 =(49 << 2), PWR_NumStandByClocks_52 =(50 << 2), PWR_NumStandByClocks_53 =(51 << 2), PWR_NumStandByClocks_54 =(52 << 2), PWR_NumStandByClocks_55 =(53 << 2), PWR_NumStandByClocks_56 =(54 << 2), PWR_NumStandByClocks_57 =(55 << 2), PWR_NumStandByClocks_58 =(56 << 2), PWR_NumStandByClocks_59 =(57 << 2), PWR_NumStandByClocks_60 =(58 << 2), PWR_NumStandByClocks_61 =(59 << 2), PWR_NumStandByClocks_62 =(60 << 2), PWR_NumStandByClocks_63 =(61 << 2), PWR_NumStandByClocks_64 =(62 << 2), PWR_NumStandByClocks_65 =(63 << 2) }
| Enumeration to define the power (PWR) number of standby clock cycles. More...

## Functions
void | PWR_disableBrownOutReset (PWR_Handle pwrHandle)
| Disables the brownout reset functions. More...
void | PWR_disableWatchDogInt (PWR_Handle pwrHandle)
| Disables the watchdog interrupt. More...
void | PWR_enableBrownOutReset (PWR_Handle pwrHandle)
| Enables the brownout reset functions. More...
void | PWR_enableWatchDogInt (PWR_Handle pwrHandle)
| Enables the watchdog interrupt. More...
PWR_Handle | PWR_init (void *pMemory, const size_t numBytes)
| Initializes the power (PWR) object handle. More...
void | PWR_setLowPowerMode (PWR_Handle pwrHandle, const PWR_LowPowerMode_e lowPowerMode)
| Sets the low power mode. More...
void | PWR_setNumStandByClocks (PWR_Handle pwrHandle, const PWR_NumStandByClocks_e numClkCycles)
| Sets the number of standby clock cycles. More...

## Detailed Description

## Data Structure Documentation

struct _PWR_Obj_

Defines the power (PWR) object.

Definition at line 175 of file pwr.h.

Data Fields
volatile uint16_t | BORCFG | BOR (Brown Out Reset) Configuration Register.
volatile uint16_t | LPMCR0 |
volatile uint16_t | rsvd_1[26264] |

## Macro Definition Documentation

#define PWR_BASE_ADDR (0x00000985)

Defines the base address of the power (PWR) registers.

Definition at line 68 of file pwr.h.

#define PWR_BORCFG_BORENZ_BITS (1 << 0)

Defines the location of the BORENZ bits in the BORCFG register.

Definition at line 73 of file pwr.h.

Referenced by PWR_disableBrownOutReset(), and PWR_enableBrownOutReset().

#define PWR_LPMCR0_LPM_BITS (3 << 0)

Defines the location of the LPM bits in the LPMCR0 register.

Definition at line 78 of file pwr.h.

Referenced by PWR_setLowPowerMode().

#define PWR_LPMCR0_QUALSTDBY_BITS (63 << 2)

Defines the location of the QUALSTDBY bits in the LPMCR0 register.

Definition at line 82 of file pwr.h.

Referenced by PWR_setNumStandByClocks().

#define PWR_LPMCR0_WDINTE_BITS (1 << 15)

Defines the location of the WDINTE bits in the LPMCR0 register.

Definition at line 86 of file pwr.h.

Referenced by PWR_disableWatchDogInt(), and PWR_enableWatchDogInt().

## Typedef Documentation

typedef struct _PWR_Obj_* PWR_Handle

Defines the power (PWR) handle.

Definition at line 185 of file pwr.h.

typedef struct _PWR_Obj_ PWR_Obj

Defines the power (PWR) object.

## Enumeration Type Documentation

enum PWR_LowPowerMode_e

Enumeration to define the power (PWR) low power modes.

Enumerator
PWR_LowPowerMode_Idle | Denotes the idle mode.
PWR_LowPowerMode_Standby | Denotes the standby mode.
PWR_LowPowerMode_Halt | Denotes the halt mode.

Definition at line 94 of file pwr.h.

enum PWR_NumStandByClocks_e

Enumeration to define the power (PWR) number of standby clock cycles.

Enumerator
PWR_NumStandByClocks_2 | Denotes 2 standby clock cycles.
PWR_NumStandByClocks_3 | Denotes 3 standby clock cycles.
PWR_NumStandByClocks_4 | Denotes 4 standby clock cycles.
PWR_NumStandByClocks_5 | Denotes 5 standby clock cycles.
PWR_NumStandByClocks_6 | Denotes 6 standby clock cycles.
PWR_NumStandByClocks_7 | Denotes 7 standby clock cycles.
PWR_NumStandByClocks_8 | Denotes 8 standby clock cycles.
PWR_NumStandByClocks_9 | Denotes 9 standby clock cycles.
PWR_NumStandByClocks_10 | Denotes 10 standby clock cycles.
PWR_NumStandByClocks_11 | Denotes 11 standby clock cycles.
PWR_NumStandByClocks_12 | Denotes 12 standby clock cycles.
PWR_NumStandByClocks_13 | Denotes 13 standby clock cycles.
PWR_NumStandByClocks_14 | Denotes 14 standby clock cycles.
PWR_NumStandByClocks_15 | Denotes 15 standby clock cycles.
PWR_NumStandByClocks_16 | Denotes 16 standby clock cycles.
PWR_NumStandByClocks_17 | Denotes 17 standby clock cycles.
PWR_NumStandByClocks_18 | Denotes 18 standby clock cycles.
PWR_NumStandByClocks_19 | Denotes 19 standby clock cycles.
PWR_NumStandByClocks_20 | Denotes 20 standby clock cycles.
PWR_NumStandByClocks_21 | Denotes 21 standby clock cycles.
PWR_NumStandByClocks_22 | Denotes 22 standby clock cycles.
PWR_NumStandByClocks_23 | Denotes 23 standby clock cycles.
PWR_NumStandByClocks_24 | Denotes 24 standby clock cycles.
PWR_NumStandByClocks_25 | Denotes 25 standby clock cycles.
PWR_NumStandByClocks_26 | Denotes 26 standby clock cycles.
PWR_NumStandByClocks_27 | Denotes 27 standby clock cycles.
PWR_NumStandByClocks_28 | Denotes 28 standby clock cycles.
PWR_NumStandByClocks_29 | Denotes 29 standby clock cycles.
PWR_NumStandByClocks_30 | Denotes 30 standby clock cycles.
PWR_NumStandByClocks_31 | Denotes 31 standby clock cycles.
PWR_NumStandByClocks_32 | Denotes 32 standby clock cycles.
PWR_NumStandByClocks_33 | Denotes 33 standby clock cycles.
PWR_NumStandByClocks_34 | Denotes 34 standby clock cycles.
PWR_NumStandByClocks_35 | Denotes 35 standby clock cycles.
PWR_NumStandByClocks_36 | Denotes 36 standby clock cycles.
PWR_NumStandByClocks_37 | Denotes 37 standby clock cycles.
PWR_NumStandByClocks_38 | Denotes 38 standby clock cycles.
PWR_NumStandByClocks_39 | Denotes 39 standby clock cycles.
PWR_NumStandByClocks_40 | Denotes 40 standby clock cycles.
PWR_NumStandByClocks_41 | Denotes 41 standby clock cycles.
PWR_NumStandByClocks_42 | Denotes 42 standby clock cycles.
PWR_NumStandByClocks_43 | Denotes 43 standby clock cycles.
PWR_NumStandByClocks_44 | Denotes 44 standby clock cycles.
PWR_NumStandByClocks_45 | Denotes 45 standby clock cycles.
PWR_NumStandByClocks_46 | Denotes 46 standby clock cycles.
PWR_NumStandByClocks_47 | Denotes 47 standby clock cycles.
PWR_NumStandByClocks_48 | Denotes 48 standby clock cycles.
PWR_NumStandByClocks_49 | Denotes 49 standby clock cycles.
PWR_NumStandByClocks_50 | Denotes 50 standby clock cycles.
PWR_NumStandByClocks_51 | Denotes 51 standby clock cycles.
PWR_NumStandByClocks_52 | Denotes 52 standby clock cycles.
PWR_NumStandByClocks_53 | Denotes 53 standby clock cycles.
PWR_NumStandByClocks_54 | Denotes 54 standby clock cycles.
PWR_NumStandByClocks_55 | Denotes 55 standby clock cycles.
PWR_NumStandByClocks_56 | Denotes 56 standby clock cycles.
PWR_NumStandByClocks_57 | Denotes 57 standby clock cycles.
PWR_NumStandByClocks_58 | Denotes 58 standby clock cycles.
PWR_NumStandByClocks_59 | Denotes 59 standby clock cycles.
PWR_NumStandByClocks_60 | Denotes 60 standby clock cycles.
PWR_NumStandByClocks_61 | Denotes 61 standby clock cycles.
PWR_NumStandByClocks_62 | Denotes 62 standby clock cycles.
PWR_NumStandByClocks_63 | Denotes 63 standby clock cycles.
PWR_NumStandByClocks_64 | Denotes 64 standby clock cycles.
PWR_NumStandByClocks_65 | Denotes 65 standby clock cycles.

Definition at line 104 of file pwr.h.

## Function Documentation

void PWR_disableBrownOutReset | ( | PWR_Handle | pwrHandle | ) |

Disables the brownout reset functions.

Parameters

  [in] | pwrHandle | The power (PWR) object handle

Definition at line 57 of file pwr.c.

References _PWR_Obj_::BORCFG, and PWR_BORCFG_BORENZ_BITS.

void PWR_disableWatchDogInt | ( | PWR_Handle | pwrHandle | ) |

Disables the watchdog interrupt.

Parameters

  [in] | pwrHandle | The power (PWR) object handle

Definition at line 69 of file pwr.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _PWR_Obj_::LPMCR0, and PWR_LPMCR0_WDINTE_BITS.

void PWR_enableBrownOutReset | ( | PWR_Handle | pwrHandle | ) |

Enables the brownout reset functions.

Parameters

  [in] | pwrHandle | The power (PWR) object handle

Definition at line 85 of file pwr.c.

References _PWR_Obj_::BORCFG, and PWR_BORCFG_BORENZ_BITS.

void PWR_enableWatchDogInt | ( | PWR_Handle | pwrHandle | ) |

Enables the watchdog interrupt.

Parameters

  [in] | pwrHandle | The power (PWR) object handle

Definition at line 97 of file pwr.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _PWR_Obj_::LPMCR0, and PWR_LPMCR0_WDINTE_BITS.

PWR_Handle PWR_init | ( | void * | pMemory,
|  | const size_t | numBytes
| ) |  |

Initializes the power (PWR) object handle.

Parameters

  [in] | pMemory | A pointer to the base address of the PWR registers
  [in] | numBytes | The number of bytes allocated for the PWR object, bytes

Returns
  The power (PWR) object handle

Definition at line 113 of file pwr.c.

void PWR_setLowPowerMode | ( | PWR_Handle | pwrHandle,
|  | const PWR_LowPowerMode_e | lowPowerMode
| ) |  |

Sets the low power mode.

Parameters

  [in] | pwrHandle | The power (PWR) object handle
  [in] | lowPowerMode | The low power mode

Definition at line 128 of file pwr.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _PWR_Obj_::LPMCR0, and PWR_LPMCR0_LPM_BITS.

void PWR_setNumStandByClocks | ( | PWR_Handle | pwrHandle,
|  | const PWR_NumStandByClocks_e | numClkCycles
| ) |  |

Sets the number of standby clock cycles.

Parameters

  [in] | pwrHandle | The power (PWR) object handle
  [in] | numClkCycles | The number of standby clock cycles

Definition at line 148 of file pwr.c.

References DISABLE_PROTECTED_REGISTER_WRITE_MODE, ENABLE_PROTECTED_REGISTER_WRITE_MODE, _PWR_Obj_::LPMCR0, and PWR_LPMCR0_QUALSTDBY_BITS.