Skip to content

File ns_power_profile.c

FileList > apollo5 > ns_power_profile.c

Go to the source code of this file

  • #include <stdio.h>
  • #include <stdlib.h>
  • #include <stdarg.h>
  • #include "am_mcu_apollo.h"
  • #include "am_util.h"
  • #include "ns_power_profile.h"
  • #include "am_util_debug.h"
  • #include "am_bsp.h"
  • #include "ns_ambiqsuite_harness.h"

Classes

Type Name
struct regmap_t

Public Static Attributes

Type Name
const regmap_t g_regmap
bool g_snapshotValid = {false, false, false, false, false}
uint32_t g_snapshots

Public Functions

Type Name
void capture_snapshot (int snapshotIndex)
void print_snapshot (int snapshotIndex, bool bJson)

Macros

Type Name
define MCUCTRL_CPUDCACHETRIM (\*(volatile uint32\_t\*)0x40020428)
define MCUCTRL_CPUICACHETRIM (\*(volatile uint32\_t\*)0x40020424)
define MCUCTRL_HFRC (\*(volatile uint32\_t\*)0x400200C0)
define MCUCTRL_HFRC2 (\*(volatile uint32\_t\*)0x400200C4)
define MCUCTRL_MISCPWRCTRL (\*(volatile uint32\_t\*)0x40020198)
define MCUCTRL_SRAMTRIM (\*(volatile uint32\_t\*)0x40020334)
define MCUCTRL_SRAMTRIMHP (\*(volatile uint32\_t\*)0x40020330)
define MCUCTRL_SSRAMTRIM (\*(volatile uint32\_t\*)0x4002042C)
define MCUCTRL_VREFGEN (\*(volatile uint32\_t\*)0x40020040)
define MCUCTRL_VREFGEN3 (\*(volatile uint32\_t\*)0x40020048)
define MCUCTRL_VREFGEN5 (\*(volatile uint32\_t\*)0x40020050)
define REGMAP_SIZE (sizeof(g\_regmap)/sizeof(g\_regmap[0]))

Public Static Attributes Documentation

variable g_regmap

const regmap_t g_regmap[];

variable g_snapshotValid

bool g_snapshotValid[5];

variable g_snapshots

uint32_t g_snapshots[5][REGMAP_SIZE];

Public Functions Documentation

function capture_snapshot

void capture_snapshot (
    int snapshotIndex
) 

function print_snapshot

void print_snapshot (
    int snapshotIndex,
    bool bJson
) 

Macro Definition Documentation

define MCUCTRL_CPUDCACHETRIM

#define MCUCTRL_CPUDCACHETRIM `(*(volatile uint32_t*)0x40020428)`

define MCUCTRL_CPUICACHETRIM

#define MCUCTRL_CPUICACHETRIM `(*(volatile uint32_t*)0x40020424)`

define MCUCTRL_HFRC

#define MCUCTRL_HFRC `(*(volatile uint32_t*)0x400200C0)`

define MCUCTRL_HFRC2

#define MCUCTRL_HFRC2 `(*(volatile uint32_t*)0x400200C4)`

define MCUCTRL_MISCPWRCTRL

#define MCUCTRL_MISCPWRCTRL `(*(volatile uint32_t*)0x40020198)`

define MCUCTRL_SRAMTRIM

#define MCUCTRL_SRAMTRIM `(*(volatile uint32_t*)0x40020334)`

define MCUCTRL_SRAMTRIMHP

#define MCUCTRL_SRAMTRIMHP `(*(volatile uint32_t*)0x40020330)`

define MCUCTRL_SSRAMTRIM

#define MCUCTRL_SSRAMTRIM `(*(volatile uint32_t*)0x4002042C)`

define MCUCTRL_VREFGEN

#define MCUCTRL_VREFGEN `(*(volatile uint32_t*)0x40020040)`

define MCUCTRL_VREFGEN3

#define MCUCTRL_VREFGEN3 `(*(volatile uint32_t*)0x40020048)`

define MCUCTRL_VREFGEN5

#define MCUCTRL_VREFGEN5 `(*(volatile uint32_t*)0x40020050)`

define REGMAP_SIZE

#define REGMAP_SIZE `(sizeof(g_regmap)/sizeof(g_regmap[0]))`


The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-utils/src/apollo5/ns_power_profile.c