PMM configuration.
More...
Go to the source code of this file.
PMM configuration.
Definition in file hal_pmm.h.
#define CLEAR_PMM_IFGS |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMIFG = 0; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVMH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL &= ~SVMHE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVMH_INTERRUPT |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE &= ~SVMHIE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVML |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL &= ~SVMLE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVML_INTERRUPT |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE &= ~SVMLIE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL &= ~SVSHE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSH_RESET |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE &= ~SVSHPE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSH_SVMH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL &= ~(SVSHE + SVMHE); PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSL |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL &= ~SVSLE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSL_RESET |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE &= ~SVSLPE; PMMCTL0_H = 0x00; ) |
#define DISABLE_SVSL_SVML |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL &= ~(SVSLE + SVMLE); PMMCTL0_H = 0x00; ) |
#define ENABLE_SVMH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL |= SVMHE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVMH_INTERRUPT |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE |= SVMHIE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVML |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL |= SVMLE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVML_INTERRUPT |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE |= SVMLIE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL |= SVSHE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSH_RESET |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE |= SVSHPE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSH_SVMH |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMHCTL |= (SVSHE + SVMHE); PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSL |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL |= SVSLE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSL_RESET |
( |
| ) |
st(PMMCTL0_H = 0xA5; PMMRIE |= SVSLPE; PMMCTL0_H = 0x00; ) |
#define ENABLE_SVSL_SVML |
( |
| ) |
st(PMMCTL0_H = 0xA5; SVSMLCTL |= (SVSLE + SVMLE); PMMCTL0_H = 0x00; ) |
#define HAL_ENTER_LPM4 |
( |
| ) |
__bis_SR_register(LPM4_bits + GIE) |
#define PMM_STATUS_ERROR 1 |
#define SVSH_DISABLED_IN_LPM_FULL_PERF |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMHCTL |= SVSHFP; SVSMHCTL &= \
~(SVSMHACE + SVSHMD); PMMCTL0_H = 0x00; )
Definition at line 98 of file hal_pmm.h.
#define SVSH_DISABLED_IN_LPM_NORM_PERF |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMHCTL &= \
~(SVSMHACE + SVSHFP + SVSHMD); PMMCTL0_H = 0x00; )
Definition at line 96 of file hal_pmm.h.
#define SVSH_ENABLED_IN_LPM_FULL_PERF |
( |
| ) |
|
Value:
PMMCTL0_H = 0xA5; SVSMHCTL |= (SVSHMD + SVSHFP); SVSMHCTL &= ~SVSMHACE; PMMCTL0_H = 0x00; )
Definition at line 93 of file hal_pmm.h.
#define SVSH_ENABLED_IN_LPM_NORM_PERF |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMHCTL |= SVSHMD; SVSMHCTL &= \
~(SVSMHACE + SVSHFP); PMMCTL0_H = 0x00; )
Definition at line 91 of file hal_pmm.h.
#define SVSH_OPTIMIZED_IN_LPM_FULL_PERF |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMHCTL |= \
(SVSHMD + SVSHFP + SVSMHACE); PMMCTL0_H = 0x00; )
Definition at line 104 of file hal_pmm.h.
#define SVSL_DISABLED_IN_LPM_FAST_WAKE |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMLCTL |= SVSLFP; SVSMLCTL &= \
~(SVSLMD + SVSMLACE); PMMCTL0_H = 0x00; )
Definition at line 86 of file hal_pmm.h.
#define SVSL_DISABLED_IN_LPM_SLOW_WAKE |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMLCTL &= \
~(SVSLFP + SVSMLACE + SVSLMD); PMMCTL0_H = 0x00; )
Definition at line 88 of file hal_pmm.h.
#define SVSL_ENABLED_IN_LPM_FAST_WAKE |
( |
| ) |
|
Value:
PMMCTL0_H = 0xA5; SVSMLCTL |= (SVSLFP + SVSLMD); SVSMLCTL &= ~SVSMLACE; PMMCTL0_H = 0x00; )
Definition at line 81 of file hal_pmm.h.
#define SVSL_ENABLED_IN_LPM_SLOW_WAKE |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMLCTL |= SVSLMD; SVSMLCTL &= \
~(SVSLFP + SVSMLACE); PMMCTL0_H = 0x00; )
Definition at line 83 of file hal_pmm.h.
#define SVSL_OPTIMIZED_IN_LPM_FAST_WAKE |
( |
| ) |
|
Value:st(PMMCTL0_H = 0xA5; SVSMLCTL |= \
(SVSLFP + SVSLMD + SVSMLACE); PMMCTL0_H = 0x00; )
Definition at line 102 of file hal_pmm.h.
void HAL_PMM_Init |
( |
void |
| ) |
|
Initializing PMM.
- Returns
- void
- Parameters
-
Definition at line 24 of file hal_pmm.c.
uint16_t SetVCore |
( |
uint8_t |
level | ) |
|
Definition at line 272 of file hal_pmm.c.
{
uint16_t actlevel;
uint16_t status = 0;
level &= PMMCOREV_3;
actlevel = (PMMCTL0 & PMMCOREV_3);
while ((level != actlevel) && (status == 0)) {
if (level > actlevel){
status = SetVCoreUp(++actlevel);
}
else {
status = SetVCoreDown(--actlevel);
}
}
return status;
}