11 #include "sw/device/lib/testing/flash_ctrl_testutils.h"
12 #include "sw/device/lib/testing/test_framework/check.h"
14 #include "sw/device/silicon_creator/manuf/lib/flash_info_fields.h"
15 #include "sw/device/silicon_creator/manuf/tests/test_wafer_auth_secret.h"
19 OTTF_DEFINE_TEST_CONFIG();
22 static dif_lc_ctrl_t lc_ctrl;
27 static status_t peripheral_handles_init(
void) {
37 CHECK_STATUS_OK(peripheral_handles_init());
48 LOG_INFO(
"Reading the isolated flash partition.");
49 uint32_t byte_address = 0;
51 actual_wafer_auth_secret[kFlashInfoWaferAuthSecretSizeIn32BitWords] =
53 CHECK_STATUS_OK(flash_ctrl_testutils_info_region_setup(
54 &flash_ctrl_state, kFlashInfoFieldWaferAuthSecret.page,
55 kFlashInfoFieldWaferAuthSecret.bank,
56 kFlashInfoFieldWaferAuthSecret.partition, &byte_address));
57 CHECK_STATUS_OK(flash_ctrl_testutils_read(
58 &flash_ctrl_state, byte_address,
59 kFlashInfoFieldWaferAuthSecret.partition, actual_wafer_auth_secret,
60 kDifFlashCtrlPartitionTypeInfo,
61 kFlashInfoWaferAuthSecretSizeIn32BitWords,
63 CHECK_ARRAYS_EQ(actual_wafer_auth_secret, kExpectedWaferAuthSecret,
64 kFlashInfoWaferAuthSecretSizeIn32BitWords);