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.

[参考译文] TMS320F2800157:PIE RAM 奇偶校验测试失败

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1514898/tms320f2800157-pie-ram-parity-test-failed

器件型号:TMS320F2800157

工具/软件:

您好:

我从事 RAM ECC 奇偶校验测试、   索引为1时、PIERAMParityTest 函数上有 ITRAP。  

在第一次迭代之后、 "RPC 0x3FFD2C 返回程序计数器[Core]"会获取该值、该值不在 RAM 或闪存范围内。 从"STL_RAM_testRAMLogic"函数返回时、索引设置为1后、CPU 生成  ITRAP。   PIE_RAM_TEST_ADDR 上的数据为0x000BB155、原始数据为0x0009B157

我尝试了"sdl_ex_ram_ecc_parity_test"示例、它在同一个 MCU 上运行良好。

我已在函数中添加了"STL_RAM_"前缀。 这些函数与"sdl_ex_ram_ecc_parity_test"示例相同

// Using the I2CB interrupt (8.3) for testing here, but you may select others
#define STL_RAM_PIE_RAM_TEST_INT        INT_I2CB
#define STL_RAM_PIE_RAM_TEST_PIEIFR_REG (PIECTRL_BASE + PIE_O_IFR8)
#define STL_RAM_PIE_RAM_TEST_PIEIFR_BIT (PIE_IFR8_INTX3)
#define STL_RAM_PIE_RAM_TEST_ACK        INTERRUPT_ACK_GROUP8
#define STL_RAM_PIE_RAM_TEST_ADDR       0x00000DB4UL

uint16_t w_test_STA_TEST_RAM_ECC_PARITY(bool injectError)
{
  (void)injectError;
  uint16_t returnVal;
  uint16_t failCount;

  // Clear all the NMI and RAM error status flags.
  MemCfg_clearCorrErrorStatus(MEMCFG_CERR_CPUREAD);
  MemCfg_clearCorrErrorInterruptStatus(MEMCFG_UCERR_CPUREAD);
  MemCfg_clearUncorrErrorStatus(MEMCFG_UCERR_CPUREAD);
  SysCtl_clearAllNMIFlags();
  SysCtl_clearInterruptStatus(0xFFFFFFFFU);

  // Configure the correctable error interrupt threshold.
  MemCfg_setCorrErrorThreshold(1U);

  // Plug the NMI and RAM correctable error ISRs.
  Interrupt_register(INT_NMI, &STL_RAM_nmiISR);
  Interrupt_register(INT_SYS_ERR, &STL_RAM_corrErrorISR);
  Interrupt_enable(INT_SYS_ERR);

  SysCtl_setInterruptStatusMask(STL_RAM_MASK_ALL_BUT_RAM_ERR);

  // Plug a routine to handle a PIE Vector Table parity error
  EALLOW;
  HWREG(CPUSYS_BASE + SYSCTL_O_PIEVERRADDR) = (uint32_t) &STL_RAM_pieVectErrorHandler;
  EDIS;

  // Enabling the NMI global interrupt (typically already enabled by boot ROM
  // or GEL file).
  SysCtl_enableNMIGlobalInterrupt();

  // Enable RAM correctable error interrupt.
  MemCfg_enableCorrErrorInterrupt(MEMCFG_CERR_CPUREAD);

  // Enable Global Interrupt (INTM) and Real Time interrupt (DBGM).
  EINT;
  ERTM;

  // Test parity functionality by injecting an error in parity RAM.
  failCount = STL_RAM_runParityTest();

  // Test parity functionality by injecting an error in PIE RAM.
  failCount += STL_RAM_runPIERAMParityTest();

  // Test ECC functionality by injecting a few correctable errors in m0Data_ECCParity.
  failCount += STL_RAM_runCorrectableECCTest();

  // Test ECC functionality by injecting an uncorrectable error in m0Data_ECCParity.
  failCount += STL_RAM_runUncorrectableECCTest();

  // Status of a successful handling of the RAM ECC/parity errors.
  if(failCount != 0U)
  {
    //TEST FAIL: RAM ECC Parity Test!
    returnVal = STA_TESTS_FAIL;
  }
  else
  {
    //TEST PASS: RAM ECC Parity Test!
    returnVal = STA_TESTS_PASS;
  }

  return returnVal;
}

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

    您好、

    我无法理解您的问题。

    您是否能够按原样运行 STL 示例?

    您在代码中做了哪些更改? 您看到了什么问题?

    从"STL_RAM_testRAMLogic"函数返回时、会生成 pie 

    以上功能是 STL 的一部分吗? 您的意思是指数1?

    谢谢

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

    您好、

    您在代码中做了哪些更改?

    我尝试在我的工程中添加"sdl_ex_ram_ecc_parity_test"示例。 我复制了"sdl_ex_ram_ecc_parity_test.c"文件内容、并 在函数名称上添加了 STL_RAM_前缀。 我还复制了必要的链接器段。

    您看到了什么问题?

    当我运行高于"w_test_STA_TEST_RAM_ECC_PARITY"的函数时、程序会进入 ITRAP ISR。 问题出在"STL_RAM_runPIERAMParityTest"函数中。 如果我注释此函数、其他函数将按预期工作。  

    索引1的含义是什么?

    当程序进入"STL_RAM_runPIERAMParityTest"函数时。 在第一次 for 循环迭代后、索引变量设置为1。

    您是否能够运行 pie 示例?

    示例工程按预期运行。