mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-26 17:51:45 +01:00
fan speed failsafe for bm1366
This commit is contained in:
parent
79430f6d3a
commit
8222b913a3
@ -9,6 +9,7 @@
|
||||
#include "INA260.h"
|
||||
#include "math.h"
|
||||
#include "serial.h"
|
||||
#include "DS4432U.h"
|
||||
|
||||
#define POLL_RATE 5000
|
||||
#define MAX_TEMP 90.0
|
||||
@ -46,7 +47,7 @@ void POWER_MANAGEMENT_task(void *pvParameters)
|
||||
power_management->voltage = INA260_read_voltage();
|
||||
power_management->power = INA260_read_power() / 1000;
|
||||
power_management->current = INA260_read_current();
|
||||
power_management->fan_speed = EMC2101_get_fan_speed();
|
||||
power_management->fan_speed = EMC2101_get_fan_speed() * 60;
|
||||
|
||||
if (strcmp(ASIC_MODEL, "BM1397") == 0)
|
||||
{
|
||||
@ -117,6 +118,14 @@ void POWER_MANAGEMENT_task(void *pvParameters)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (strcmp(ASIC_MODEL, "BM1366") == 0)
|
||||
{
|
||||
if (power_management->fan_speed < 1000)
|
||||
{
|
||||
ESP_LOGE(TAG, "Detected fan speed too slow, setting vCore to 0");
|
||||
DS4432U_set_vcore(0);
|
||||
}
|
||||
}
|
||||
|
||||
// ESP_LOGI(TAG, "target %f, Freq %f, Volt %f, Power %f", target_frequency, power_management->frequency_value, power_management->voltage, power_management->power);
|
||||
vTaskDelay(POLL_RATE / portTICK_PERIOD_MS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user