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.

[参考译文] RM42L432:RM42L432:将1位错误和2位错误注入主 SRAM、但在注入2位错误时不会产生结果。

Guru**** 2330840 points
Other Parts Discussed in Thread: RM42L432, HALCOGEN
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/577299/rm42l432-rm42l432-inject-1-bit-error-and-2-bit-error-into-primary-sram-but-the-result-is-not-expected-when-inject-2-bit-error

器件型号:RM42L432
主题中讨论的其他器件: HALCOGEN

最近、我测试了 RM42L432主 SRAM 的数据 ECC 逻辑。 我使用 HalCoGen +IAR Embedded Workbench for ARM。  

我使用 TI Safe Diagnostci 库 v 2.3-1中的数据中止函数"exception hanlders.c"。

1.通过修改 SRAM 的数据注入1位错误:

_coreEnableRamEcc_();
volatile uint64 sramEccTest[2]={0xA0、0x10};
uint64 readram1、readram2;
_coreDisableRamEcc_();
sramEccTest[0]= 0xA1;
sramEccTest[1]= 0x11;
_coreEnableRamEcc_();
readram1=sramEccTest[0];
readram2=sramEccTest[1];

结果:(1)寄存器 RAMERRSTATUS:SERR=1;(2) ESMSR1=0x14000000


2.通过修改 ECC 数据注入1位错误:

_coreEnableRamEcc_();
volatile uint64 sramEccTest[2]={0xA0、0x10};
uint64 readram1、readram2;
易失性 uint64* eccb1、eccb2;

eccb1 =&sramEccTestBuff[0];
eccb1 = eccb1 +(0x00400000u/sizeof (uint64));

eccB2 =&sramEccTestBuff[1];
eccB2 = eccB2 +(0x00400000u/sizeof (uint64));

bit_set (sl_tcram1REG->RAMCTRL、TCRAM_RAMCTRL_ECCWREN);/*启用写入 ECC*/
bit_set (sl_tcram2REG->RAMCTRL、TCRAM_RAMCTRL_ECCWREN);/*启用写入 ECC*/

* eccB1 ^= 0x01;
* eccB2 ^= 0x01;

bit_set (sl_tcram1REG->RAMCTRL、TCRAM_RAMCTRL_ECCWRDIS);/*禁用写入 ECC*/
bit_set (sl_tcram2REG->RAMCTRL、TCRAM_RAMCTRL_ECCWRDIS);/*禁用写入 ECC*/

readram1=sramEccTest[0];
readram2=sramEccTest[1];

结果:(1)寄存器 RAMERRSTATUS:SERR=1;(2) ESMSR1=0x14000000

 

3.通过修改 SRAM 的数据注入2位错误:

_coreEnableRamEcc_();
volatile uint64 sramEccTest[2]={0xA0、0x10};
uint64 readram1、readram2;
_coreDisableRamEcc_();
sramEccTest[0]= 0xB1;
sramEccTest[1]= 0x21;
_coreEnableRamEcc_();
readram1=sramEccTest[0];
readram2=sramEccTest[1];

结果:(1)寄存器 RAMERRSTATUS:DERR=0;(2) ESMSR3=0x00000000
这不是预期的结果!

4.通过修改 ECC 数据注入2位错误:

_coreEnableRamEcc_();
volatile uint64 sramEccTest[2]={0xA0、0x10};
uint64 readram1、readram2;
易失性 uint64* eccb1、eccb2;

eccb1 =&sramEccTestBuff[0];
eccb1 = eccb1 +(0x00400000u/sizeof (uint64));

eccB2 =&sramEccTestBuff[1];
eccB2 = eccB2 +(0x00400000u/sizeof (uint64));

bit_set (sl_tcram1REG->RAMCTRL、TCRAM_RAMCTRL_ECCWREN);/*启用写入 ECC*/
bit_set (sl_tcram2REG->RAMCTRL、TCRAM_RAMCTRL_ECCWREN);/*启用写入 ECC*/

* eccB1 ^= 0x03;
* eccB2 ^= 0x03;

bit_set (sl_tcram1REG->RAMCTRL、TCRAM_RAMCTRL_ECCWRDIS);/*禁用写入 ECC*/
bit_set (sl_tcram2REG->RAMCTRL、TCRAM_RAMCTRL_ECCWRDIS);/*禁用写入 ECC*/


readram1=sramEccTest[0];
readram2=sramEccTest[1];

结果:(1)寄存器 RAMERRSTATUS:DERR=1;(2) ESMSR3=0x28;


我的问题:
(1)为什么"通过修改 SRAM 的数据注入2位错误"不会获得预期结果?  
(2)如何更正我的代码以获得预期结果?

谢谢你。

   

 

 

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

    代码看起来正常。 您是否执行了由 HAlCogen 生成的代码? 在 HAlCoGen 生成的代码中启用高速缓存。 是否可以禁用高速缓存并执行另一项测试?

    此致、
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    我无法禁用高速缓存。 RM42L432中有硬错误缓存。
    还有其他方法吗? 谢谢你。