Other Parts Discussed in Thread: HALCOGEN, TMDX570LC43HDK
Hello, TI Experts,
Our customer sent us some additional questions about HALCoGen example code from E2E thread as below;
- HALCoGen: 04.05.02
- SafeTI Diagnostic LibraryVersion: 2.2.0
- CCS:Version 6.1.3.00033
- sample_code:\Hercules\HALCoGen\v04.05.02\examples\TMS570LC43x\example_SafetyLib.c
http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/565357/2075947#2075947
From the advice as below of the E2E thread, IESRx,ILSRx related problem seemed to be solved.
Thank you very much!
- Configure within Halcogen then re-generate the code.
- EsmInit should be called after you have ran through all of the initial startup diagnostics.
Now our customer is checking the nERROR-pin behavior with the IEPSR4 register setting in esminit().
- They created the CCS project based on the guide written in example_SafetyLib.c of HALCoGen.
- ESM register setting was done by ESM tab of HALCoGen.
- We checked the point of the generated file "HL_esm.c".
- set bit20 of IEPSR4 to enable nERROR-pin
esmREG->IEPSR4 = .. | (uint32)((uint32)1U << 20U) | ..
Result:
- This program reachs to main();
- ESM error flags are as below
ESMSR1 0x00000000
ESMSR2 0x00000000
ESMSR3 0x00000000
ESMSR4 0x00000000 (Gr1-52 also cleared)
- But nERROR-LED turns on on the TMS570LC4357-EVM(TMDX570LC43HDK).
Question:
- Why does nERROR-LED turn on, after clearing ESM FLAGS in esminit() ?
Now, We are checking the behaviors as follows;
case1: Checking error source
- We comment out following statements in HL_esm.c to remove ESM-flag clear operations.
// esmREG->SR1[0U] = 0xFFFFFFFFU;
// esmREG->SR1[1U] = 0xFFFFFFFFU;
// esmREG->SSR2 = 0xFFFFFFFFU;
// esmREG->SR1[2U] = 0xFFFFFFFFU;
// esmREG->SR4[0U] = 0xFFFFFFFFU;
// esmREG->SR7[0U] = 0xFFFFFFFFU;
- The result
ESMSR1 0x00000000
ESMSR2 0x00000000
ESMSR3 0x00000000
ESMSR4 0x00100000 (Gr1-52 is set)
nERROR-LED turns on.
-> We identified the error source is only Gr1-52.
case2: Checking EKR register behavior (because EKR seems to be related to nERROR-pin behavior.)
- We only comment out following statements in "HL_esm.c" to remove EKR register setting,
// esmREG->EKR = 0x00000000U;
- The result
ESMSR1 0x00000000
ESMSR2 0x00000000
ESMSR3 0x00000000
ESMSR4 0x00000000
nERROR-LED turns off. (but we don't know why nERROR-LED turns off)
case3: Solve the problem on Latest version HALCoGen or not?
- We used Latest version HALCoGen(04.06.01)
- The result is same as case1. (It seems the problem is not solved.)
case4: Solve the problem on Latest version SafeTI-Lib or not?
- We used Latest version SafeTI Diagnostic LibraryVersion(2.3.1)
- The result:
-This program went into while(1)-loop.
-If we rewrite to "PERIPHRAMECCCHECK_ENABLE == 0" in example_SafetyLib.c,
this program reachs to main();
ESMSR1 0x00000000
ESMSR2 0x00000000
ESMSR3 0x00000000
ESMSR4 0x00000000
nERROR-LED turns on.
We would appreciate if you tell us how to solve this "nERROR-LED" problem.
We would also appreciate if you check the attached our CCS-projects.
Best regards,