Other Parts Discussed in Thread: HALCOGEN
I am looking to run through some final tests on the ESM configuration we have selected for our application. The tests are intended to inject the fault and then indicate via our ESM handler which diagnostic tripped us. I have the following diagnostics configured in Halcogen, each selected based upon their use within our application or as a requirement of the governing safety standards.
1 :MIBADC2
6 : Flash ECC Single
7: NHET Parity
11: Clock Monitor Int
15: VIM Parity
18: MIBSPI3 Parity
19: MIBADC1 Parity
26: RAM ECC Even
27: CPU Selftest
28: RAM ECC Odd
31: CCM Selftest
35: EEPROM Single
36: EEPROM Double
37: IOMM Mux Config
All ESM faults are configured to toggle nError and trigger a Low Level Interrupt.
Our Application and board IO architecture is designed to AND all safety outputs with the nError pin, thus on an ESM error we de-energize all safety outputs.
My verification of the ESM configuration is making use of the selftest routines in test builds to invoke the ESM fault after startup checks complete, the expectation that my ESM handler will be ran and we will see the failure handled. Giving indication that the faults we have identified can be captured and handled appropriately by the application.
The interrupt handler is shown below
#pragma WEAK(esmGroup1Notification) void esmGroup1Notification(uint32 channel) { /* enter user code between the USER CODE BEGIN and USER CODE END. */ /* USER CODE BEGIN (1) */ /* Save ESM Channel c:000.SYS.A.115.v7 */ uni_cfg_set_esm(0U,channel); /* USER CODE END */ } /* USER CODE BEGIN (2) */ /* USER CODE END */ #pragma WEAK(esmGroup2Notification) void esmGroup2Notification(uint32 channel) { /* enter user code between the USER CODE BEGIN and USER CODE END. */ /* USER CODE BEGIN (3) */ /* Save ESM Channel c:000.SYS.A.115.v7 */ uni_cfg_set_esm(1U,channel); /* USER CODE END */ }
The uni_cfg_set_esm routine will save the 'channel' to FEE. Subsequent powerups will permit interrogation of this value before resetting to give some opportunity for us to determine what type of ESM fault we are seeing. I have tested this successfully for the following channels:
1,7,11,15,18,19,26,10,6,35
I have the following questions before I can consider this verification exercise complete and would appreciate input from Ti:
1. Please confirm the clock that the MCU will revert to when the clock monitor diagnostic fails - is it the LPO?
2. Confirm that both checkRAMUERRTest() & checkFlashEEPROMECC() would be expected to trigger ESM channel 6 faults
3. Is there a method to inject RAM ECC odd parity faults (channel 27)?
4. Is there a method to inject EEPROM double bit faults (channel 36)?
5. When I run cpuSelfTest() from my application loop the processor effectively hangs and I've read around a number of posts that indicate this would be expected. Is it true to say that upon a true run time CPU error I cannot expect my application to get the opportunity to execute and therefore will not be able to attempt the recording of the channel source ID to FEE?
6. Similar to 5, CCM selftest routines will not permit my application to capture and record the channel source ID to FEE?
7. nError will be driven low in every case of an ESM error and remain low until the EKR register is cleared. I have captured this behavior successfully for channels 1,7,11,15,18,19,26,10,6,35 but for those other channels that I have questioned above I am not able to show that nError is held low.
I appreciate that these tests are running at startup in the startup code but I would like, for my own verification, to see each one at least once on bench trigger the appropriate response on nError and also be recorded to FEE. If there is a better approach to recording for future debug which ESM error has triggered the fault I would also be interested to know.
Thanks
Jamie