This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] [参考译文] [常见问题解答] SK-AM64B:--operation=flash-phy-tuning-data 的用途是什么?

Guru**** 2480515 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1459826/faq-sk-am64b-what-is-the-purpose-of---operation-flash-phy-tuning-data

器件型号:SK-AM64B

工具与软件:

大家好!

在 MCU PLUS SDK 产品中、对于 Sitara SoC、必须有不同的配置文件。

这些配置文件位于以下目录中:  MCU_PLUS_SDK_INSTALL_PATH\tools\boot\sbl_prebuilt

在一些配置(.cfg)文件中、引入了一个行、即:

--operation=flash-phy-tuning-data

让我们了解一下它的目的是什么。

此致、

Vaibhav

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    通过查看以下常见问题解答、请了解什么是 OSPI PHY 调优以及为何需要进行该调优: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1431856/faq-am62a7-ospi-phy-tuning-algorithm

    如果您仔细阅读、将会更容易理解后续的解释。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    现在您已经熟悉了 PHY 调优算法是什么、让我们继续。

    在 phy 调优的过程中、我们会尝试 rxDLL、txDLL 和 readDelay 值的不同组合、并从闪存部分读取一些字节。

    如果正确读取该值、则将其标记为正值、否则标记为负值(针对该值未读回的情况)。

    此值/字节必须为:

    1. 数据
    2. 以某种偏移写入闪存器件

    这样、当我们回读时、就可以与结束时的原始已知数据进行比较

    该值基本上是128字节数据、它是在名为 ospi_phy.c ( 注意:在一些 MCU plus SDK 中、该文件被重命名为 ospi_phy_DQS.c、但用途相同 )。

    static uint8_t gOspiFlashAttackVector[OSPI_FLASH_ATTACK_VECTOR_SIZE] =
    {
     0xFEU,   // 0b11111110 @ 0x00000400 1024 bytes
     0xFF,   // 0b11111111 @ 0x00000401 1025 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000000011
     0x01,   // 0b00000001 @ 0x00000402 1026 bytes
     0x01,   // 0b00000001 @ 0x00000403 1027 bytes
     0x01,   // 0b00000001 @ 0x00000404 1028 bytes
     0x01,   // 0b00000001 @ 0x00000405 1029 bytes
     0x01,   // 0b00000001 @ 0x00000406 1030 bytes
     0x00,   // 0b00000000 @ 0x00000407 1031 bytes
     0x00,   // 0b00000000 @ 0x00000408 1032 bytes
     0xFE,   // 0b11111110 @ 0x00000409 1033 bytes
     0xFE,   // 0b11111110 @ 0x0000040A 1034 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000000011
     0x01,   // 0b00000001 @ 0x0000040B 1035 bytes
     0x01,   // 0b00000001 @ 0x0000040C 1036 bytes
     0x01,   // 0b00000001 @ 0x0000040D 1037 bytes
     0x01,   // 0b00000001 @ 0x0000040E 1038 bytes
     0x00,   // 0b00000000 @ 0x0000040F 1039 bytes
     0x00,   // 0b00000000 @ 0x00000410 1040 bytes
     0xFE,   // 0b11111110 @ 0x00000411 1041 bytes
     0xFE,   // 0b11111110 @ 0x00000412 1042 bytes
     0x01,   // 0b00000001 @ 0x00000413 1043 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111110011
     0xFF,   // 0b11111111 @ 0x00000414 1044 bytes
     0xFF,   // 0b11111111 @ 0x00000415 1045 bytes
     0xFF,   // 0b11111111 @ 0x00000416 1046 bytes
     0xFF,   // 0b11111111 @ 0x00000417 1047 bytes
     0xFF,   // 0b11111111 @ 0x00000418 1048 bytes
     0x00,   // 0b00000000 @ 0x00000419 1049 bytes
     0x00,   // 0b00000000 @ 0x0000041A 1050 bytes
     0xFE,   // 0b11111110 @ 0x0000041B 1051 bytes
     0xFE,   // 0b11111110 @ 0x0000041C 1052 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111110011
     0xFF,   // 0b11111111 @ 0x0000041D 1053 bytes
     0xFF,   // 0b11111111 @ 0x0000041E 1054 bytes
     0xFF,   // 0b11111111 @ 0x0000041F 1055 bytes
     0xFF,   // 0b11111111 @ 0x00000420 1056 bytes
     0x00,   // 0b00000000 @ 0x00000421 1057 bytes
     0x00,   // 0b00000000 @ 0x00000422 1058 bytes
     0xFE,   // 0b11111110 @ 0x00000423 1059 bytes
     0xFE,   // 0b11111110 @ 0x00000424 1060 bytes
     0xFF,   // 0b11111111 @ 0x00000425 1061 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000001011
     0x01,   // 0b00000001 @ 0x00000426 1062 bytes
     0x01,   // 0b00000001 @ 0x00000427 1063 bytes
     0x01,   // 0b00000001 @ 0x00000428 1064 bytes
     0x01,   // 0b00000001 @ 0x00000429 1065 bytes
     0x01,   // 0b00000001 @ 0x0000042A 1066 bytes
     0xFE,   // 0b11111110 @ 0x0000042B 1067 bytes
     0x00,   // 0b00000000 @ 0x0000042C 1068 bytes
     0xFE,   // 0b11111110 @ 0x0000042D 1069 bytes
     0xFE,   // 0b11111110 @ 0x0000042E 1070 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000001011
     0x01,   // 0b00000001 @ 0x0000042F 1071 bytes
     0x01,   // 0b00000001 @ 0x00000430 1072 bytes
     0x01,   // 0b00000001 @ 0x00000431 1073 bytes
     0x01,   // 0b00000001 @ 0x00000432 1074 bytes
     0xFE,   // 0b11111110 @ 0x00000433 1075 bytes
     0x00,   // 0b00000000 @ 0x00000434 1076 bytes
     0xFE,   // 0b11111110 @ 0x00000435 1077 bytes
     0xFE,   // 0b11111110 @ 0x00000436 1078 bytes
     0x01,   // 0b00000001 @ 0x00000437 1079 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111111011
     0xFF,   // 0b11111111 @ 0x00000438 1080 bytes
     0xFF,   // 0b11111111 @ 0x00000439 1081 bytes
     0xFF,   // 0b11111111 @ 0x0000043A 1082 bytes
     0xFF,   // 0b11111111 @ 0x0000043B 1083 bytes
     0xFF,   // 0b11111111 @ 0x0000043C 1084 bytes
     0xFE,   // 0b11111110 @ 0x0000043D 1085 bytes
     0x00,   // 0b00000000 @ 0x0000043E 1086 bytes
     0xFE,   // 0b11111110 @ 0x0000043F 1087 bytes
     0xFE,   // 0b11111110 @ 0x00000440 1088 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111111011
     0xFF,   // 0b11111111 @ 0x00000441 1089 bytes
     0xFF,   // 0b11111111 @ 0x00000442 1090 bytes
     0xFF,   // 0b11111111 @ 0x00000443 1091 bytes
     0xFF,   // 0b11111111 @ 0x00000444 1092 bytes
     0xFE,   // 0b11111110 @ 0x00000445 1093 bytes
     0x00,   // 0b00000000 @ 0x00000446 1094 bytes
     0xFE,   // 0b11111110 @ 0x00000447 1095 bytes
     0xFE,   // 0b11111110 @ 0x00000448 1096 bytes
     0xFF,   // 0b11111111 @ 0x00000449 1097 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000000111
     0x01,   // 0b00000001 @ 0x0000044A 1098 bytes
     0x01,   // 0b00000001 @ 0x0000044B 1099 bytes
     0x01,   // 0b00000001 @ 0x0000044C 1100 bytes
     0x01,   // 0b00000001 @ 0x0000044D 1101 bytes
     0x01,   // 0b00000001 @ 0x0000044E 1102 bytes
     0x00,   // 0b00000000 @ 0x0000044F 1103 bytes
     0xFE,   // 0b11111110 @ 0x00000450 1104 bytes
     0xFE,   // 0b11111110 @ 0x00000451 1105 bytes
     0xFE,   // 0b11111110 @ 0x00000452 1106 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000000111
     0x01,   // 0b00000001 @ 0x00000453 1107 bytes
     0x01,   // 0b00000001 @ 0x00000454 1108 bytes
     0x01,   // 0b00000001 @ 0x00000455 1109 bytes
     0x01,   // 0b00000001 @ 0x00000456 1110 bytes
     0x00,   // 0b00000000 @ 0x00000457 1111 bytes
     0xFE,   // 0b11111110 @ 0x00000458 1112 bytes
     0xFE,   // 0b11111110 @ 0x00000459 1113 bytes
     0xFE,   // 0b11111110 @ 0x0000045A 1114 bytes
     0x01,   // 0b00000001 @ 0x0000045B 1115 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111110111
     0xFF,   // 0b11111111 @ 0x0000045C 1116 bytes
     0xFF,   // 0b11111111 @ 0x0000045D 1117 bytes
     0xFF,   // 0b11111111 @ 0x0000045E 1118 bytes
     0xFF,   // 0b11111111 @ 0x0000045F 1119 bytes
     0xFF,   // 0b11111111 @ 0x00000460 1120 bytes
     0x00,   // 0b00000000 @ 0x00000461 1121 bytes
     0xFE,   // 0b11111110 @ 0x00000462 1122 bytes
     0xFE,   // 0b11111110 @ 0x00000463 1123 bytes
     0xFE,   // 0b11111110 @ 0x00000464 1124 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 111110111
     0xFF,   // 0b11111111 @ 0x00000465 1125 bytes
     0xFF,   // 0b11111111 @ 0x00000466 1126 bytes
     0xFF,   // 0b11111111 @ 0x00000467 1127 bytes
     0xFF,   // 0b11111111 @ 0x00000468 1128 bytes
     0x00,   // 0b00000000 @ 0x00000469 1129 bytes
     0xFE,   // 0b11111110 @ 0x0000046A 1130 bytes
     0xFE,   // 0b11111110 @ 0x0000046B 1131 bytes
     0xFE,   // 0b11111110 @ 0x0000046C 1132 bytes
     0xFF,   // 0b11111111 @ 0x0000046D 1133 bytes
     // Even Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000001111
     0x01,   // 0b00000001 @ 0x0000046E 1134 bytes
     0x01,   // 0b00000001 @ 0x0000046F 1135 bytes
     0x01,   // 0b00000001 @ 0x00000470 1136 bytes
     0x01,   // 0b00000001 @ 0x00000471 1137 bytes
     0x01,   // 0b00000001 @ 0x00000472 1138 bytes
     0xFE,   // 0b11111110 @ 0x00000473 1139 bytes
     0xFE,   // 0b11111110 @ 0x00000474 1140 bytes
     0xFE,   // 0b11111110 @ 0x00000475 1141 bytes
     0xFE,   // 0b11111110 @ 0x00000476 1142 bytes
     // Odd  Aligned Victim bit: 0, vic time slice : 111110000, agr time slice : 000001111
     0x01,   // 0b00000001 @ 0x00000477 1143 bytes
     0x01,   // 0b00000001 @ 0x00000478 1144 bytes
     0x01,   // 0b00000001 @ 0x00000479 1145 bytes
     0x01,   // 0b00000001 @ 0x0000047A 1146 bytes
     0xFE,   // 0b11111110 @ 0x0000047B 1147 bytes
     0xFE,   // 0b11111110 @ 0x0000047C 1148 bytes
     0xFE,   // 0b11111110 @ 0x0000047D 1149 bytes
     0xFE,   // 0b11111110 @ 0x0000047E 1150 bytes
     0x01    // 0b00000001 @ 0x0000047F 1151 bytes
    };

    当在配置文件中写入--operation=flash-phy-tuning-data 时、它基本上在驱动程序级别、以某个已知偏移量将这个已知的128字节写入闪存部分。

    原因是、在我们进行 phy 调整时、我们可以为 rxDLL、txDLL 和 readDelay (的不同组合读回该值 注意:  有时称为"rdDelay" )并最终找到最佳调优点(OTP)。