CLEON  Version 1
Cloud-Offloaded GPS Receiver
hal_pmm.c File Reference

PMM configuration. More...

#include "cleon_conf.h"
#include "app_define.h"
#include "sys_define.h"
#include "hal_define.h"
#include "fs_define.h"
Include dependency graph for hal_pmm.c:

Go to the source code of this file.

Functions

void HAL_PMM_Init (void)
 Initializing PMM.
 
uint16_t SetVCore (uint8_t level)
 

Variables

volatile unsigned int SysRstIv = 0
 

Detailed Description

PMM configuration.

Definition in file hal_pmm.c.

Function Documentation

void HAL_PMM_Init ( void  )

Initializing PMM.

Returns
void
Parameters
void

Definition at line 24 of file hal_pmm.c.

{
SysRstIv = SYSRSTIV;
// Set Vcore voltage to level 2 in order to support 12MHz MCLK
// SVSH enabled
// SVSHRVL = 2 (2.04V), SVSMHRRL = 2 (2.14V)
// Enable SYSH and SVMH
// Enable SVSH reset
// SVS is enabled in LPM as normal performance
// Clear existing interrupt flags
}

Here is the call graph for this function:

Here is the caller graph for this function:

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; // Set Mask for Max. level
actlevel = (PMMCTL0 & PMMCOREV_3); // Get actual VCore
// step by step increase or decrease
while ((level != actlevel) && (status == 0)) {
if (level > actlevel){
status = SetVCoreUp(++actlevel);
}
else {
status = SetVCoreDown(--actlevel);
}
}
return status;
}

Here is the caller graph for this function:

Variable Documentation

volatile unsigned int SysRstIv = 0

Definition at line 14 of file hal_pmm.c.