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.

[参考译文] AM2434:读取和写入扩展 OTP

Guru**** 2773145 points

Other Parts Discussed in Thread: AM2434

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1619074/am2434-reading-and-writing-extended-otp

器件型号: AM2434

您好:
在读取上的扩展 OTP 存储器区域时遇到问题  AM243 LP 评估板 。 我遵循  中的 EXT_OTP 示例文档  MCU+ SDK v11.01.00.17
系统配置:
  • 硬件: AM243 LP www.ti.com/.../LP-AM243
  • 引导加载程序:  sbl_ospi.release.hs_fs.tiimage (预置)
  • SDK 版本: MCU+ SDK v11.01.00.19
  • 固件: DMSC v10.0.8 (Fiery Fox)、ABI 修订版 4.0
  • AM243 LP 的 VPP: J22 开路 — 发现读取时的电子保险丝电压不一致
问题描述:
当 Sciclient 似乎正确初始化时、所有读取 OTP MMR 区域的调用都会失败。 该 Sciclient_otpGetMmr 函数返回一个错误、并且每个 MMR (0 到 11) 的报告值一致 0x357

在 Sciclient_service 中、我们获得成功、但 respParam.flags 不是 ACK。

共享代码以供阅读:  

主要
#include <stdlib.h>
#include "ti_drivers_config.h"
#include "ti_board_config.h"

void ext_otp_printMmrs(void *args);

int main(void)
{
    System_init();
    Board_init();

    ext_otp_printMmrs(NULL);

    Board_deinit();
    System_deinit();

    return 0;
}

ECT_OTP_PRINTMMRS 代码

#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include <kernel/dpl/HwiP.h>
#include <kernel/dpl/CacheP.h>
#include <kernel/dpl/SemaphoreP.h>
#include <kernel/dpl/ClockP.h>
#include <kernel/dpl/HeapP.h>
#include <kernel/dpl/CycleCounterP.h>
#include "ti_drivers_open_close.h"
#include "ti_board_open_close.h"

#include "ti_drivers_config.h"
#include <drivers/sciclient.h>
#include <drivers/sciclient/include/tisci/security/tisci_ext_otp.h>

int32_t ext_otp_readMmr(uint8_t mmrIdx, uint32_t *mmrVal)
{
    int32_t status = SystemP_SUCCESS;
    Sciclient_ReqPrm_t reqParam ;
    Sciclient_RespPrm_t respParam ;
    struct tisci_msg_read_otp_mmr_req request ;
    struct tisci_msg_read_otp_mmr_resp response ;

    request.mmr_idx       = mmrIdx;

    reqParam.messageType    = (uint16_t) TISCI_MSG_READ_OTP_MMR;
    reqParam.flags          = (uint32_t) TISCI_MSG_FLAG_AOP;
    reqParam.pReqPayload    = (const uint8_t *) &request;
    reqParam.reqPayloadSize = (uint32_t) sizeof (request);
    reqParam.timeout        = (uint32_t) SystemP_WAIT_FOREVER;

    respParam.flags           = (uint32_t) 0;   /* Populated by the API */
    respParam.pRespPayload    = (uint8_t *) &response;
    respParam.respPayloadSize = (uint32_t) sizeof (response);

    status = Sciclient_service(&reqParam, &respParam);

	if ( (status==SystemP_SUCCESS) && ((respParam.flags & TISCI_MSG_FLAG_ACK) == TISCI_MSG_FLAG_ACK) )
	{
		*mmrVal = response.mmr_val; 
		DebugP_log("Success Reading OTP MMR \r\n");
		DebugP_log("OTP MMR Value reported :0x%x \r\n", (uint32_t) *mmrVal);
	}
	else
	{
		
		DebugP_log("Error Reading OTP MMR ... \r\n");
		status = SystemP_FAILURE; 
	}

	return status;
}




void ext_otp_printMmrs(void *args)
{
    /* Open drivers to open the UART driver for console */
    Drivers_open();
    Board_driversOpen();

    int32_t status = SystemP_SUCCESS; 
	uint32_t mmrVal, i; 
	for (i=0; i<12; i++)
	{
		status = ext_otp_readMmr(i, &mmrVal);
		DebugP_log("OTP MMR %d: 0x%x \r\n", i, mmrVal);
		//DebugP_log("Error reading MMR %d \r\n", i);
	}
    
#if defined(AMP_FREERTOS_A53)
    DebugP_log("All tests have passed on a53_core%d!!\r\n", Armv8_getCoreId());
#else
    DebugP_log("All tests have passed!!\r\n");
#endif
    Board_driversClose();
    Drivers_close();
}
串行输出:
DMSC Firmware Version 10.0.8--v10.00.08 (Fiery Fox)
DMSC Firmware revision 0xa
DMSC ABI revision 4.0

KPI_DATA: [BOOTLOADER_PROFILE] Boot Media       : NOR SPI FLASH 
KPI_DATA: [BOOTLOADER_PROFILE] Boot Media Clock : 100.000 MHz 
KPI_DATA: [BOOTLOADER_PROFILE] Boot Image Size  : 86 KB 
KPI_DATA: [BOOTLOADER_PROFILE] Cores present    : 
r5f0-0
KPI_DATA: [BOOTLOADER PROFILE] SYSFW init                       :      11098us 
KPI_DATA: [BOOTLOADER PROFILE] System_init                      :      11336us 
KPI_DATA: [BOOTLOADER PROFILE] Drivers_open                     :       1637us 
KPI_DATA: [BOOTLOADER PROFILE] Board_driversOpen                :     478934us 
KPI_DATA: [BOOTLOADER PROFILE] Sciclient Get Version            :       9852us 
KPI_DATA: [BOOTLOADER PROFILE] CPU load                         :      16209us 
KPI_DATA: [BOOTLOADER PROFILE] SBL End                          :          2us 
KPI_DATA: [BOOTLOADER_PROFILE] SBL Total Time Taken             :     529072us 

Image loading done, switching to application ...
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 0: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 1: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 2: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 3: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 4: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 5: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 6: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 7: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 8: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 9: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 10: 0x357 
Error Reading OTP MMR ... 
OTP MMR Value reported :0x357 
OTP MMR 11: 0x357 

 

问题:
  1. 启动  HS-TCA FS  AM2434 型号需要特定的 TISCI 主机权限或防火墙配置来访问默认 SDK 示例中未涉及到的扩展 OTP?
  2. 报告的值/错误代码是什么  0x357  在 TISCI 响应上下文中表示?
  3. 两者之间是否存在已知的兼容性问题  DMSC 固件 v10.0.8   TISCI_MSG_GET_OTP_MMR 这个 SoC 要传达的消息是什么?

 谢谢 Matej。

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

    您好:

    由于 SBL 在自行复位到应用程序之前会完成安全交付、因此无法从应用程序请求 TISCI OTP 消息

    https://github.com/TexasInstruments/mcupsdk-core/blob/6a622a5c2729c5ad10ba066646944609dc0c64bb/source/drivers/bootloader/soc

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

    谢谢 Prashant、在这种情况下、是否可以使用 R5_0_0 应用内核的扩展 OTP(读取/写入)?  
    我们可以在引导加载程序或 sciclient_defaultBoardcfg_security.c 中修改的内容

    BR、Matej。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    在这种情况下、是否可以使用 r5_0_0 应用程序内核中的(读取/写入)扩展 OTP?

    只能通过注释“Bootloader_socSecHandover"函“函数调用来实现、但这会产生影响、好像您无法运行 SDK 中的 SA2UL 示例。