What you can do with CAN port of TG452 is, it can implement CAN interface packets transmission to TCP, TCP packets transmission to CAN interface. The test of CAN communication as bellow:
- Settings of Gateway
- Enable data collection
- Set baud rate of CAN port
- Set server protocol as Transparent
- Test process and Data transmission
- Connection Diagram
- We will use USB-CAN converter to test. The converter is sent as follows:
(1) Serial frame transmits to CAN message(Base frame format)
(2) CAN message(Extended frame) transmits to Serial frame
- Base frame data transmission test
The CAN Base frame information is 11 bytes (3 + 8) and consists of two parts: information and data. The first 3 bytes are the information part.
① 8 bytes data, if the valid data is less than 8 bytes, 00 is added after it;
② 4byte ID, standard frame less than 11bit valid, extended frame less than 29bit valid Valid data length;
③ Effective data length, range 01-08, remote frame is the request;
④ Remote frame identification, 00 is the non-remote frame, 01 is the remote frame identifier;
⑤ Extended frame identification, 00 is the standard frame, 01 is the extended frame;
⑥ The prefix of the packet must be AA.
- Analog base frame serial frame data:
The base frame ID is valid at a minimum of 11 bits, that is, the maximum frame ID is 0x7ff.
AA 00 00 08 00 00 07 FF 00 01 02 03 04 05 06 07
AA 00 00 08 00 00 07 FF 08 09 0A 0B 0C 0D 0E 0F
- Extended frame data transmission test:
The CAN extended frame information is 13 bytes (5 + 8) and consists of two parts, the information and the data part. The first 5 bytes are the information part.
The extended frame ID is valid for a maximum of 29 bits, that is, 0x1fffff
AA 01 00 08 1F FF FF FF 00 01 02 03 04 05 06 07
AA 01 00 08 1F FF FF FF 08 09 0A 0B 0C 0D 0E 0F
Relevant resource:
Picture of Cover: https://www.youtube.com/watch?v=8nl3XkL1eTc
Comment