Tool/software: Code Composer Studio
Getting to the point where I have encountered this problem is actually welcome progress, and that is thanks to the valuable responses I have gotten so far.
I am using HalCoGen 4.6.1 to create builds for a RM46 HDK. I have a USB CAN device to send prepared CAN frames. The prepared messages can have different lengths (DLC). In evaluating the response times, I am reading the DLC value and sending a CAN message out with the DLC value.
Reliably, the first DLC value is wrong as shown in IF2MCTL. It should be either 6 or 8, but it is 7. I have traces where it should be 8, but 7; and where it should be 6, but is 7. The DLC in IF2MCTL becomes accurate after the first frame.
Also, there is a 400 ms delay from the device sends the frame and when the return frame indicates the message length.
;$FILEVERSION=1.1
;$STARTTIME=42937.5972109375
;
; H:\IoT\TI\20170721_CANLogs\WhySeven2nd.trc
;
; Start time: 7/21/2017 14:19:59.025.0
; Generated by PCAN-View v4.1.1.463
;
; Message Number
; | Time Offset (ms)
; | | Type
; | | | ID (hex)
; | | | | Data Length
; | | | | | Data Bytes (hex) ...
; | | | | | |
;---+-- ----+---- --+-- ----+--- + -+ -- -- -- -- -- -- --
1) 5060.6 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
2) 5062.0 Rx 00000002 1 07
3) 5560.6 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
4) 5562.0 Rx 00000002 1 08
5) 6060.6 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
6) 6060.6 Tx 00000001 6 00 74 2D 91 CA F2
7) 6062.0 Rx 00000002 1 08
8) 6062.8 Rx 00000002 1 08
9) 6440.7 Tx 00000001 6 00 74 2D 91 CA F2
10) 6441.9 Rx 00000002 1 06
11) 6560.7 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
12) 6562.0 Rx 00000002 1 06
13) 6940.7 Tx 00000001 6 00 74 2D 91 CA F2
14) 6942.0 Rx 00000002 1 08
15) 7060.7 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
16) 7062.0 Rx 00000002 1 06
17) 7440.7 Tx 00000001 6 00 74 2D 91 CA F2
18) 7442.0 Rx 00000002 1 08
;$FILEVERSION=1.1
;$STARTTIME=42937.5921254167
;
; H:\IoT\TI\20170721_CANLogs\WhySeven.trc
;
; Start time: 7/21/2017 14:12:39.636.0
; Generated by PCAN-View v4.1.1.463
;
; Message Number
; | Time Offset (ms)
; | | Type
; | | | ID (hex)
; | | | | Data Length
; | | | | | Data Bytes (hex) ...
; | | | | | |
;---+-- ----+---- --+-- ----+--- + -+ -- -- -- -- -- -- --
1) 2748.3 Tx 00000001 6 00 74 2D 91 CA F2
2) 2749.5 Rx 00000002 1 07
3) 3248.3 Tx 00000001 6 00 74 2D 91 CA F2
4) 3249.6 Rx 00000002 1 06
5) 3748.3 Tx 00000001 6 00 74 2D 91 CA F2
6) 3748.3 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
7) 3749.6 Rx 00000002 1 06
8) 3750.5 Rx 00000002 1 06
9) 4112.3 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
10) 4113.7 Rx 00000002 1 08
11) 4248.3 Tx 00000001 6 00 74 2D 91 CA F2
12) 4249.6 Rx 00000002 1 08
13) 4612.4 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
14) 4613.8 Rx 00000002 1 06
15) 4748.4 Tx 00000001 6 00 74 2D 91 CA F2
16) 4749.6 Rx 00000002 1 08
17) 5112.4 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
18) 5113.8 Rx 00000002 1 06
19) 5612.4 Tx 0CEF900A 8 06 07 00 00 00 00 00 FF
20) 5613.8 Rx 00000002 1 08