mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'refactor/improve_p4_psram_timing_tuning_point_selection_v5.2' into 'release/v5.2'
mspi: improve p4 psram timing tuning point selection (v5.2) See merge request espressif/esp-idf!38188
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2019-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -248,8 +248,17 @@ static void s_find_max_consecutive_success_points(uint8_t *array, uint32_t size,
|
||||
i++;
|
||||
}
|
||||
|
||||
*out_length = match_num > max ? match_num : max;
|
||||
*out_end_index = match_num == size ? size : end;
|
||||
/**
|
||||
* this is to deal with the case when the last points are consecutive 1, e.g.
|
||||
* {1, 0, 0, 1, 1, 1, 1, 1, 1}
|
||||
*/
|
||||
if (match_num > max) {
|
||||
max = match_num;
|
||||
end = i - 1;
|
||||
}
|
||||
|
||||
*out_length = max;
|
||||
*out_end_index = end;
|
||||
}
|
||||
|
||||
static void s_select_best_tuning_config(mspi_timing_config_t *config, uint32_t consecutive_length, uint32_t end, const uint8_t *reference_data, bool is_flash)
|
||||
|
Reference in New Issue
Block a user