AnsweredAssumed Answered

Why different test result of S12G192 and S12XHY128 which are the same MSCANV3?

Question asked by Kim Chan on Mar 19, 2018

Hello,

 

I'm debugging CAN tests of S12G192 and S12XHY128 at the same time. I noticed that the test results differ from these two derivate, though they have the same CAN --- MSCAN V3.

Here is a brief of my testcase:

 

(Test tool will send test frame every 10ms)

1. Init CAN, Init mailbox, Activate Can

2. Idle loop, until RxCounter superior to 20 or timeout elapsed (2s) (Everytime frame from test tool has been received, RxCounter will increment.And every time successfully received, a frame will be sent from ECU)
2.1 Transmit all Tx frames (CAN_TransmitFrame) configured in mailboxes every 10ms.

2.2. After 10 receptions
* Enter critical session
* Active wait for 100ms
* Configure Tx mailboxes (STD mode) 
* ...
* Exit critical session
This loop must block message confirmation and message reception to CAN driver.
This loop shall be done only once.

3. Check Output

And what's the difference between them is:

after waiting for 100ms receiving and sending will start to work.

As for the S12G192, the log(here I pick up the 100ms waiting part):

5471.7024 2 100 Tx d 1 B0
5471.7124 2 100 Tx d 1 B0
5471.7224 2 100 Tx d 1 B0
5471.7324 2 100 Tx d 1 B0
5471.7424 2 100 Tx d 1 B0
5471.7524 2 100 Tx d 1 B0
5471.7624 2 100 Tx d 1 B0
5471.7724 2 100 Tx d 1 B0
5471.7824 2 100 Tx d 1 B0
5471.7924 2 100 Tx d 1 B0
5471.7935 2 200 Rx d 1 B0
5471.7936 2 200 Rx d 1 B0
5471.7937 2 200 Rx d 1 B0
5471.8024 2 100 Tx d 1 B0
5471.8026 2 200 Rx d 1 B0
5471.8035 2 201 Rx d 1 B2
5471.8036 2 202 Rx d 1 B3
5471.8124 2 100 Tx d 1 B0
5471.8126 2 200 Rx d 1 B0
5471.8135 2 201 Rx d 1 B2
5471.8136 2 202 Rx d 1 B3

After waiting for 100ms 3 frames(ID:200) will be sent . And according to test results, RxCounter increment 3 and now it sent 3 frames so it's right.

 

But as for S12XHY128, it's like this:

321636.0184 2 100 Tx d 1 B0
321636.0284 2 100 Tx d 1 B0
321636.0384 2 100 Tx d 1 B0
321636.0484 2 100 Tx d 1 B0
321636.0584 2 100 Tx d 1 B0
321636.0684 2 100 Tx d 1 B0
321636.0784 2 100 Tx d 1 B0
321636.0884 2 100 Tx d 1 B0
321636.0984 2 100 Tx d 1 B0
321636.1084 2 100 Tx d 1 B0
321636.1089 2 200 Rx d 1 B0
321636.1184 2 100 Tx d 1 B0
321636.1185 2 200 Rx d 1 B0
321636.1189 2 201 Rx d 1 B2
321636.1191 2 202 Rx d 1 B3

RxCounter increment 3 but only sent 1 frame. So the test result showed me that test tool should have receive two more frames(ECU should have sent two more frames)

But I can't understand why it will be different because they are using the same CAN module MSCANV3.

 

So if anyone have some suggestions for me to debug?

Any question about the test description please just let me know.

 

Br,

Kim

Outcomes