Skip to content

Commit

Permalink
make sure to VCORE_init() and VCORE_set_voltage() no matter what hw v…
Browse files Browse the repository at this point in the history
…ersion.
  • Loading branch information
skot committed Sep 23, 2024
1 parent 7b5e3ef commit e79127f
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions main/self_test/self_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,35 +147,30 @@ void self_test(void * pvParameters)
default:
}

uint8_t result = VCORE_init(GLOBAL_STATE);
VCORE_set_voltage(nvs_config_get_u16(NVS_CONFIG_ASIC_VOLTAGE, CONFIG_ASIC_VOLTAGE) / 1000.0, GLOBAL_STATE);

// VCore regulator testing
switch (GLOBAL_STATE->device_model) {
case DEVICE_MAX:
case DEVICE_ULTRA:
case DEVICE_SUPRA:
if(GLOBAL_STATE->board_version != 402){
if(!DS4432U_test()){
if (GLOBAL_STATE->board_version != 402){
if(!DS4432U_test()) {
ESP_LOGE(TAG, "DS4432 test failed!");
display_msg("DS4432U:FAIL", GLOBAL_STATE);
return;
}
}else{

uint8_t result = VCORE_init(GLOBAL_STATE);
VCORE_set_voltage(nvs_config_get_u16(NVS_CONFIG_ASIC_VOLTAGE, CONFIG_ASIC_VOLTAGE) / 1000.0, GLOBAL_STATE);

if(result != 0){
} else {
if (result != 0) {
ESP_LOGE(TAG, "TPS546 test failed!");
display_msg("TPS546:FAIL", GLOBAL_STATE);
return;
}
}
break;
case DEVICE_GAMMA:

uint8_t result = VCORE_init(GLOBAL_STATE);
VCORE_set_voltage(nvs_config_get_u16(NVS_CONFIG_ASIC_VOLTAGE, CONFIG_ASIC_VOLTAGE) / 1000.0, GLOBAL_STATE);

if(result != 0){
if (result != 0) {
ESP_LOGE(TAG, "TPS546 test failed!");
display_msg("TPS546:FAIL", GLOBAL_STATE);
return;
Expand Down

0 comments on commit e79127f

Please sign in to comment.