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.

[参考译文] TMS570LC4357:启用测试后 STC 自检未完成。

Guru**** 2466550 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1073477/tms570lc4357-stc-self-test-is-not-getting-completed-after-enabling-the-test

部件号:TMS570LC4357
“线程:测试”中讨论的其它部件

您好,

我在以下应用程序中执行 STC 自检:VCLK 和 HCLK 为90MHz,GCLK1为180MHz。  该代码是参考 SafeTI 库代码获取的。  

*sys2_stc_clk_div = 0x00000000ul;  // CPU Logic BIST Clock Prescalar STCLKDIV of system 2 module = 0 /

// Maximum STC clock rate support at 180 MHz GCLK1 is 90 MHz. Divide GCLK1 by 2 to achieve this  clock rate.
*stcclkdiv = 0x02020000ul;  // STC Clock Divider Register of STC module = 0x02020000 , To run a diagnostic check on the CPU self-test controller

*sys1_esr = (1u << 5u); // Clear CPU RST status bit in the System Exception Status Register in the system module

*stcscscr = 0UL; // Disable the signature compare logic self-check

*stcgcr0 = (*stcgcr0 & 0x0000F8FEul) | ((125ul << 16ul) | 1ul); // Configure STCGCR0 to start the test from interval 0 till 125.

*stctpr = 0xFFFFFFFFul; // Configure maximum time-out period in STCTPR

for (uint32 index = 0UL; index < (64 + (64 * 1U)); index++); // wait for 64 VBUS clock cycles at least, based on HCLK to VCLK ratio

*stcgcr1 &= 0xFFFFF0F0ul; // Clear the bit fields of STCGCR1
*stcgcr1 |= 0x00000500ul; // Select core 1 for self test
*stcgcr1 |= 0x0000000Aul; // Enable the self test run

// Idle the CPU, so that the self-test can start
__asm__ __volatile__ (
	"WFI \n"
	"nop \n"
	"nop \n"
	"nop \n"
	"nop \n"
	"nop \n"
	"nop \n"
	"nop \n"
	"DMB \n"
	"DMB \n"
);

启用测试 并执行装配说明后,自检状态仍处于活动状态,STCGSTAT 寄存器中的 ST_ACTIVE 位显示为0xA,而 test_Fail,test_done 位则显示为0。

已了解 WFI 指令正在作为 NOP 指令执行,因此不会重置 CPU。 由于在 CPU 重置后需要指向0x0,因此未将汇编代码提供给链接寄存器中的地址分支。

通过 ARM 处理器的论坛,了解到应在 WFI 指令之前禁用中断,以使 CPU 保持休眠模式。

在 STC 自检中,在执行 WFI 指令之前,由于自检之前执行的操作,不精确/异步中止在 CPSR 寄存器中暂挂。 如何使中断不处于挂起状态,以便 STC 自检可以运行,然后使用 WFI 指令重置处理器?

请告诉我们问题解决方法,为什么 STC 自检未使用上述代码完成,以及如何完成。 这是否是由于不精确/异步中止?  另外,请确认在执行上述代码的 STC 自检时是否有任何遗漏?

谢谢你,

蒂鲁马拉。

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

    您好, 蒂鲁马拉,

    SDL 有一个针对 LC43x 设备调用 SDL API 的示例。 启动期间调用 STC 自检。 请尝试此示例。

    如果您为 STC 自检开发了自己的代码: 10.9 STC 配置示例,请按照 TRM 中的测试步骤进行操作