Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions main/thermal/EMC2103.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ esp_err_t EMC2103_init(int temp_offset_param, bool flip_param)
// Configure the fan setting
ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2103_dev_handle, EMC2103_CONFIGURATION1, 0), TAG, "Failed to configure EMC2103");
ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2103_dev_handle, EMC2103_PWM_CONFIG, 0x00), TAG, "Failed to configure PWM");
ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2103_dev_handle, EMC2103_PWM_BASE_FREQ, 0x00), TAG, "Failed to configure PWM base frequency");

return ESP_OK;

Expand Down
5 changes: 5 additions & 0 deletions main/thermal/EMC2302.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ esp_err_t EMC2302_init()

ESP_LOGI(TAG, "EMC2302 init");

ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2302_dev_handle, EMC2302_PWM_BASEF123, 0x00), TAG, "Failed to set PWM base frequency");

ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2302_dev_handle, EMC2302_PWM1_DIVIDE, 0x01), TAG, "Failed to set PWM1 divider");
ESP_RETURN_ON_ERROR(i2c_bitaxe_register_write_byte(EMC2302_dev_handle, EMC2302_PWM2_DIVIDE, 0x01), TAG, "Failed to set PWM2 divider");

// Set the minimum fan speed measured and reported to 500 RPM
ESP_RETURN_ON_ERROR(set_fan_range(EMC2302_FAN1_CONFIG1, RNG_500_RPM, &fan1_multiplier), TAG, "Failed to set fan 1 config");
ESP_RETURN_ON_ERROR(set_fan_range(EMC2302_FAN2_CONFIG1, RNG_500_RPM, &fan2_multiplier), TAG, "Failed to set fan 2 config");
Expand Down