diff --git a/main/http_server/axe-os/src/app/components/home/home.component.html b/main/http_server/axe-os/src/app/components/home/home.component.html
index d513662..87ff5f2 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.html
+++ b/main/http_server/axe-os/src/app/components/home/home.component.html
@@ -156,20 +156,64 @@
Loading dashboard...
+
+
+
+
+
+ {{info.maxPower / info.voltage | number:'1.1-1'}}A
+
+
+
info.maxPower / info.voltage * 0.9">
+ ⚠️ High current draw
-
-
-
-
+
+
+
+
+
+ {{info.coreVoltage}}V
+
+
+
+
+ 0">
+
+
+
= 38 && info.vrCurrent < 40">
+ ⚠️ High VR current — approaching limit
+
+
= 40">
+ 🔥 VR overcurrent — protection may activate
+
+
+
+
diff --git a/main/http_server/axe-os/src/app/components/home/home.component.ts b/main/http_server/axe-os/src/app/components/home/home.component.ts
index 4e7cce6..7a1cd70 100644
--- a/main/http_server/axe-os/src/app/components/home/home.component.ts
+++ b/main/http_server/axe-os/src/app/components/home/home.component.ts
@@ -264,7 +264,7 @@ export class HomeComponent {
info.power = Number.parseFloat(info.power.toFixed(1))
info.voltage = Number.parseFloat((info.voltage / 1000).toFixed(1))
info.current = Number.parseFloat((info.current / 1000).toFixed(1))
- info.coreVoltageActual = Number.parseFloat((info.coreVoltageActual / 1000).toFixed(2))
+ info.coreVoltageActual = Number.parseFloat(info.coreVoltageActual.toFixed(3))
info.coreVoltage = Number.parseFloat((info.coreVoltage / 1000).toFixed(2))
info.temp = Number.parseFloat(info.temp.toFixed(1))
if (info.chiptemp1) info.chiptemp1 = Number.parseFloat(info.chiptemp1.toFixed(1))
diff --git a/main/http_server/axe-os/src/app/services/system.service.ts b/main/http_server/axe-os/src/app/services/system.service.ts
index 3d492da..6929cd9 100644
--- a/main/http_server/axe-os/src/app/services/system.service.ts
+++ b/main/http_server/axe-os/src/app/services/system.service.ts
@@ -24,6 +24,7 @@ export class SystemService {
power: 42.670,
voltage: 12208.75,
current: 2237.5,
+ vrCurrent: 34.5,
temp: 60,
vrTemp: 55,
maxPower: 55,
@@ -36,7 +37,7 @@ export class SystemService {
freeHeapSpiram: 50504,
isPSRAMAvailable: 1,
coreVoltage: 1200,
- coreVoltageActual: 1200,
+ coreVoltageActual: 1.234,
hostname: "BitForge",
macAddr: "2C:54:91:88:C9:E3",
ssid: "default",
diff --git a/main/http_server/axe-os/src/models/ISystemInfo.ts b/main/http_server/axe-os/src/models/ISystemInfo.ts
index ab1f28f..f76d4d0 100644
--- a/main/http_server/axe-os/src/models/ISystemInfo.ts
+++ b/main/http_server/axe-os/src/models/ISystemInfo.ts
@@ -10,6 +10,7 @@ export interface ISystemInfo {
power: number,
voltage: number,
current: number,
+ vrCurrent?: number,
temp: number,
vrTemp: number,
maxPower: number,
diff --git a/main/http_server/http_server.c b/main/http_server/http_server.c
index f2f36e0..9c745e9 100644
--- a/main/http_server/http_server.c
+++ b/main/http_server/http_server.c
@@ -626,6 +626,7 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "power", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.power);
cJSON_AddNumberToObject(root, "voltage", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.voltage);
cJSON_AddNumberToObject(root, "current", Power_get_current(GLOBAL_STATE));
+ cJSON_AddNumberToObject(root, "vrCurrent", Power_get_vr_current(GLOBAL_STATE));
cJSON_AddNumberToObject(root, "temp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.chip_temp_avg);
cJSON_AddNumberToObject(root, "vrTemp", GLOBAL_STATE->POWER_MANAGEMENT_MODULE.vr_temp);
cJSON_AddNumberToObject(root, "maxPower", Power_get_max_settings(GLOBAL_STATE));
@@ -643,7 +644,7 @@ static esp_err_t GET_system_info(httpd_req_t * req)
cJSON_AddNumberToObject(root, "freeHeapInternal", heap_caps_get_free_size(MALLOC_CAP_INTERNAL));
cJSON_AddNumberToObject(root, "freeHeapSpiram", heap_caps_get_free_size(MALLOC_CAP_SPIRAM));
cJSON_AddNumberToObject(root, "coreVoltage", nvs_config_get_u16(NVS_CONFIG_ASIC_VOLTAGE, CONFIG_ASIC_VOLTAGE));
- cJSON_AddNumberToObject(root, "coreVoltageActual", VCORE_get_voltage_mv(GLOBAL_STATE));
+ cJSON_AddNumberToObject(root, "coreVoltageActual", Power_get_vr_voltage(GLOBAL_STATE));
cJSON_AddNumberToObject(root, "frequency", nvs_config_get_u16(NVS_CONFIG_ASIC_FREQ, CONFIG_ASIC_FREQUENCY));
cJSON_AddStringToObject(root, "ssid", ssid);
cJSON_AddStringToObject(root, "macAddr", formattedMac);
diff --git a/main/power/power.c b/main/power/power.c
index 2b84185..e7ccf57 100644
--- a/main/power/power.c
+++ b/main/power/power.c
@@ -90,6 +90,28 @@ int Power_get_nominal_voltage(GlobalState * GLOBAL_STATE) {
}
}
+float Power_get_vr_voltage(GlobalState * GLOBAL_STATE) {
+
+ switch (GLOBAL_STATE->device_model) {
+ case BITFORGE_NANO:
+ return TPS546_get_vout();
+ default:
+ }
+
+ return 0.0;
+}
+
+float Power_get_vr_current(GlobalState * GLOBAL_STATE) {
+
+ switch (GLOBAL_STATE->device_model) {
+ case BITFORGE_NANO:
+ return TPS546_get_iout();
+ default:
+ }
+
+ return 0.0;
+}
+
float Power_get_vreg_temp(GlobalState * GLOBAL_STATE) {
switch (GLOBAL_STATE->device_model) {
diff --git a/main/power/power.h b/main/power/power.h
index bcb8ddc..283c3a6 100644
--- a/main/power/power.h
+++ b/main/power/power.h
@@ -8,6 +8,8 @@
esp_err_t Power_disable(GlobalState * GLOBAL_STATE);
float Power_get_current(GlobalState * GLOBAL_STATE);
+float Power_get_vr_voltage(GlobalState * GLOBAL_STATE);
+float Power_get_vr_current(GlobalState * GLOBAL_STATE);
float Power_get_power(GlobalState * GLOBAL_STATE);
float Power_get_input_voltage(GlobalState * GLOBAL_STATE);
float Power_get_vreg_temp(GlobalState * GLOBAL_STATE);