User Tools

Site Tools


doc:hw_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
doc:hw_commands [2014/03/29 09:18] – [Bus Generic Commands (P 9) for the CAN Bus] admindoc:hw_commands [2017/03/18 12:50] – [Protocol Specific Commands (P 6) for the CAN UDS Protocol] admin
Line 86: Line 86:
 |  1  |  0..max  |  0  | set response timeout in 10ms units  |   | |  1  |  0..max  |  0  | set response timeout in 10ms units  |   |
 |  5  |  $xxx  |  0  | set ECU Request-ID (RECVID)  |   | |  5  |  $xxx  |  0  | set ECU Request-ID (RECVID)  |   |
-|  6  |  $xxx  |  0  | activate Tester present on CAN-ID $xxx    +|  6  |  $xxx  |  0  | start Tester present on CAN-ID $xxx with actual interval and mask 10 (Out of Mem)  
-|  7  |  $xxx  |  0  | deactivate Tester present on CAN-ID  |   | +|  7  |  $xxx  |  0  | stop Tester present on CAN-ID  |   | 
-|  8  |  0..max  |  0  | set Tester present interval in ms  |   | +|  8  |  0..max  |  0  | set Tester present interval in 10ms units (Default 250) |   | 
-|  9  |  $xxx  |  0  | set ECU Response-ID (SENDID)  |   |+|  9  |  $xxx  |  0  | set ECU Response-ID (SENDID) (Default 0, makes SENDID= RECVID %%|%% 0x08)  |   | 
 +|  10  |  $xxx  |  0  | set Tester Present mask 02 xx (Default 0x80)  |   | 
 +|  11  |  0 or 1  |  0  | set/resets the Ping Mode Flag    |
  
 ==== Protocol Specific Commands (P 6) for the CAN Raw Protocol ==== ==== Protocol Specific Commands (P 6) for the CAN Raw Protocol ====
  
-No dedicated p- commands for this mode, as the function is mainly driven by the sent data content. For more details about the CAN Raw Mode, please refer to the [[rfc_canraw-mode|RFC CAN Raw Mode]] 
  
 +For more details about the CAN Raw Mode, please refer to the [[:doc:rfc_canraw-mode|RFC CAN Raw Mode]]
  
 +
 +^  Command  ^  Value1  ^  Value2  ^  Meaning  ^  Errorcodes  |
 +|  1  |  |  |(PARAM_CANRAW_FRAME_DELAY, not used yet?) |  |
 +|  2  |  |  |(PARAM_CANRAW_SENDID, not used yet?) |  |
 +|  3  |  0..max  |  |repeats the sequence n+1 times. $FFFF means endless loop, send "p 6 3 0" to stop again. Note: This Counter needs to set again before each use, it's not "re-usable" |  |
 +
 +
 +\\
  
 ==== Protocol Specific Commands (P 6) for the CAN RTD Protocol ==== ==== Protocol Specific Commands (P 6) for the CAN RTD Protocol ====
Line 114: Line 124:
 ==== Bus Specific Commands (P 8) for the CAN Bus, used in D2 Design ==== ==== Bus Specific Commands (P 8) for the CAN Bus, used in D2 Design ====
  
-^  Command  ^  Value1  ^  Value2  ^  Meaning  ^  Errorcodes  ^ + 
-|  2  |  0  |  0  | CAN transceiver: Silent mode (CAN deactive)  |   +^  Command  ^  Value1  ^  Value2  ^  Meaning  ^  Errorcodes  | 
-|  2  |  1  |  0  | CAN transceiver: Loop back (internal loop)    +|  2  |  0  |  0  |CAN transceiver: Silent mode (CAN deactive)  | 
-|  2  |  2  |  0  | CAN transceiver: Loop back combined with silent mode    +|  2  |  1  |  0  |CAN transceiver: Loop back (internal loop) |  
-|  2  |  3  |  0  | CAN transceiver: Normal mode (CAN active)   +|  2  |  2  |  0  |CAN transceiver: Loop back combined with silent mode |  
-|  3  |  1  |  0  | Standard-CAN init (initialize CAN controller with 125kbit/s, 11bit)    +|  2  |  3  |  0  |CAN transceiver: Normal mode (CAN active) **ATTENTION**: You need to active the bus **before** you set the CAN-Filters, but not after, otherways the settings are lost and the filters are closed   
-|  3  |  2  |  0  | Standard-CAN init (initialize CAN controller with 250kbit/s, 11bit)    +|  3  |  0 or 1  |  0  |Standard-CAN init (initialize CAN controller with 125kbit/s, 11bit) |  
-|  3  |  3  |  0  | Standard-CAN init (initialize CAN controller with 500kbit/s, 11bit)    +|  3  |  2  |  0  |Standard-CAN init (initialize CAN controller with 250kbit/s, 11bit) |  
-|  3  |  4  |  0  | Standard-CAN init (initialize CAN controller with 1000kbit/s, 11bit)    +|  3  |  3  |  0  |Standard-CAN init (initialize CAN controller with 500kbit/s, 11bit) |  
-|  3  |  5  |  0  | Extended-CAN init (initialize CAN controller with 125kbit/s, 29bit)  |   +|  3  |  4  |  0  |Standard-CAN init (initialize CAN controller with 1000kbit/s, 11bit) |  
-|  3  |  6  |  0  | Extended-CAN init (initialize CAN controller with 250kbit/s, 29bit)  |   +|  3  |  5  |  0  |Extended-CAN init (initialize CAN controller with 125kbit/s, 29bit)  | 
-|  3  |  7  |  0  | Extended-CAN init (initialize CAN controller with 500kbit/s, 29bit)    +|  3  |  6  |  0  |Extended-CAN init (initialize CAN controller with 250kbit/s, 29bit)  | 
-|  3  |  8  |  0  | Extended-CAN init (initialize CAN controller with 1000kbit/s, 29bit)    +|  3  |  7  |  0  |Extended-CAN init (initialize CAN controller with 500kbit/s, 29bit) |  
-|  4  |  0  |  0  | HS-CAN (Relais switch - OFF)    +|  3  |  8  |  0  |Extended-CAN init (initialize CAN controller with 1000kbit/s, 29bit) |  
-|  4  |  1  |  0  | MS-CAN (Relais switch - ON)    +|  4  |  0  |  0  |HS-CAN (Relais switch - OFF) |  
-|  10  |   <Filter-No>  |   $<CAN-ID>  | set Filter CAN-ID (11bit CAN-ID 0x0000-0x07FF) where Filter-No is 1-20, i.e. p 8 10 1 $720    +|  4  |  1  |  0  |MS-CAN (Relais switch - ON) |  
-|  11  |   <Filter-No>    $<Mask-ID>  | set Filter Mask-ID (11bit Mask-ID 0x0000-0x07FF) where Filter-No is 1-20 and Filter Mask depends on Filter CAN-ID (0=don'care 1=match), i.e. p 8 11 1 $7F0 (here: $720 - $72F)  |   +|  10  |  <Filter-No>  $<CAN-ID> | set Filter CAN-ID (11bit CAN-ID 0x0000-0x07FF) where Filter-No is 1-N*, i.e. p 8 10 1 $720 |  
-|  12  |    <Filter-No>    $<CAN-ID>  | set Filter CAN-ID (29bit CAN-ID 0x00000000-0x1FFFFFFF) where Filter-No is 1-10, i.e. p 8 12 1 $18F30557    +|  11  |  <Filter-No> $<Mask-ID> |set Filter Mask-ID (11bit Mask-ID 0x0000-0x07FF) where Filter-No is 1-N* and Filter Mask depends on Filter CAN-ID (0=don'care 1=match), i.e. p 8 11 1 $7F0 (here: $720 - $72F)  | 
-|  13  |    <Filter-No>  |   $<Mask-ID>   set Filter Mask-ID (29bit Mask-ID 0x00000000-0x1FFFFFFF) where Filter-No is 1-10 and Filter Mask depends on Filter CAN-ID (0=don't care 1=match), i.e. p 8 11 1 $1FFFFFF0 (here: $18F30550 - $18F3055F)    +|  12  |  <Filter-No> $<CAN-ID> | set Filter CAN-ID (29bit CAN-ID 0x00000000-0x1FFFFFFF) where Filter-No is 1-N*, i.e. p 8 12 1 $18F30557 |  
-|  14  |  0  |  0  | set all 11bit CAN filter to CAN-ID $0000 and Mask-ID $07FF (= disable any CAN traffic to application)   |+|  13  |  <Filter-No>  $<Mask-ID> | set Filter Mask-ID (29bit Mask-ID 0x00000000-0x1FFFFFFF) where Filter-No is 1-N* and Filter Mask depends on Filter CAN-ID (0=don't care 1=match), i.e. p 8 11 1 $1FFFFFF0 (here: $18F30550 - $18F3055F) |  
 +|  14  |  0  |  0  |set all 11bit CAN filter to CAN-ID $0000 and Mask-ID $07FF (= disable any CAN traffic to application)  | 
 + 
 + * N: number of filters is implementation depending, see ''#define MAXCANFILTER='' in ''mc_can.h''  
 + 
 +The socketCAN implementation has some advanced filter settings. Please read the [[https://www.kernel.org/doc/Documentation/networking/can.txt|Socketcan dokumentation (chapter 4.1)]] for details. 
 + 
 +\\
  
 ===== Bus Generic Commands (P 9) ===== ===== Bus Generic Commands (P 9) =====
 ==== Bus Generic Commands (P 9) for the CAN Bus ==== ==== Bus Generic Commands (P 9) for the CAN Bus ====
  
-^  Command  ^  Value1  ^  Value2  ^  Meaning  ^  Errorcodes  ^ + 
-|  0  |  0  |  0  | show info which interface/bus is active (i.e. CAN-Bus)  |   +^  Command  ^  Value1  ^  Value2  ^  Meaning  ^  Errorcodes  | 
-|  0  |  3  |  0  | show info of CAN transceiver operating mode  |   +|  0  |  0  |  0  |show info which interface/bus is active (i.e. CAN-Bus)  | 
-|  0  |  4  |  0  | ??  |   +|  0  |  3  |  0  |show info of CAN transceiver operating mode  | 
-|  0  |  5  |  1  | read different CAN error counters   +|  0  |  4  |  0  |show info about CAN ID side and bitrate |  | 
-|  0  |  5  |  2  | delete all software internal CAN error counters  |   +|  0  |  5  |  1  |read different CAN counters: rx rxerr tx txerr rxerr2 txerr2 busoff buswarn buspass   
-|  0  |  10  |  0  | show all 11bit CAN-ID filter, each line with two 11bit CAN-filters like: \\  +|  0  |  5  |  2  |delete all software internal CAN error counters  | 
-<CAN-ID> <Mask-ID> <CAN-ID> <Mask-ID>  |   +|  0  |  10  |  0  |show all 11bit CAN-ID filter, each line with two 11bit CAN-filters like:   \\  <CAN-ID> <Mask-ID> <CAN-ID> <Mask-ID>  | 
-|  0  |  11  |  0  | show all 29bit CAN-ID filter, each line with one 29bit CAN-filter like: \\  +|  0  |  11  |  0  |show all 29bit CAN-ID filter, each line with one 29bit CAN-filter like:   \\  <CAN-ID> <Mask-ID>  | 
-<CAN-ID> <Mask-ID>   |+ 
 + 
 +\\
  
doc/hw_commands.txt · Last modified: 2017/04/02 07:09 by admin