Hello (again),
In TRM figure 12-8 (example 5) is described "very interesting" behavior of error pin in case reset is given while error pin is up.
There is also a direct note which prohibits that kind of usage:
"This case is not recommended and should be avoided by the application"
What does SafeTI? In CCMR4F_SELF_TEST_ERROR_FORCING test it disables both ISR & error pin action
sl_esmREG->IECR1 = GET_ESM_BIT_NUM(ESM_G1ERR_CCMR4_SELFTEST);
sl_esmREG->DEPAPR1 = GET_ESM_BIT_NUM(ESM_G1ERR_CCMR4_SELFTEST);
Then generates the error & checks that ESM channel bit goes active and after that *** some drums ***
/* Clear nERROR */
_SL_HoldNClear_nError();
This yields to a situation that in case after that test comes some real ESM1 error which is not routed to ISR the error pin just rapidly goes down and then back up...
Every other error pin reset looks to relate to esm2 & 3 error handling when error pin action is always included...
Is the founding (fatal) bug or not? Tested that this reset is not needed there and error pin stays up without it.
TRM also misses case which is like example 4, but where error pin reset is given between failures. How the CPU behaves in that case? Will the reset given before 2nd failure still rise the pin after t_err_low from 2nd failure? If yes does the possible 2nd reset after 2nd failure but before error pin has been raised "banked" and applied later like in example 5?
TRM document bug: this sentence is also wrong, this says something which is then undoed in example 5 (this says clearly that reset request is allowed/noticed only when pin is low)
"This request is done by writing an appropriate key (0x5) to the key register (ESMEKR) during the ERROR pin low time"