TEC increment after ACK error in Error Passive state
According to ISO 11898-1 2015 TEC shall be incremented if transmitter sends an error frame.
This has following exception:
If the transmitter is error-passive and detects an ACK error because of not detecting a dominant ACK and does not detect a dominant bit while sending its passive error flag.
However, the current implementation is only looking at ACK error in passive error state! it does NOT at all consider the second part of the exception. Test 8.6.18 is specifically designed to detect this situation.
The behavior shall be following: If there is dominant bit detected during passive error flag and it DUT detects dominant bit, it shall not detect bit error nor increment error counter.
However, if ACK Error occured in Error Passive state and DUT starts transmitting passive error flag due to this ACK error, then receiving dominant bit during consecutive passive error flag shall lead to increment of TEC by 8!
So this is exception in TEC increment during passive error flag. Error frame probably still does not have to be retransmitted, only TEC shall be incremented!