examples/gene_SYNC_HCS12/readme.txt
changeset 54 a2ca09ac1523
parent 0 4472ee7c6c3e
child 57 522ece4057d2
equal deleted inserted replaced
53:73bc47a0db55 54:a2ca09ac1523
     1 Generator of Canopen SYNC message (cobid = 0x80)
     1 Generator of Canopen SYNC message (cobid = 0x80)
     2 ---------------------------------------------
     2 ---------------------------------------------
     3 francis.dupin@inrets.fr
     3 francis.dupin@inrets.fr
     4 27 Janv 2005
     4 27 Janv 2005. 
     5 
     5 Revised 13 Dec 2006
     6 Node for Microcontroler MC9S12DP256 
       
     7 on board  T-board (http://www.elektronikladen.de
       
     8 
       
     9 =============
       
    10 Node N° 0x03
       
    11 =============
       
    12 
       
    13 This node generate only the SYNC signal.
       
    14 (cob-id : 0x80)
       
    15 
       
    16 To test this node
       
    17 -----------------
       
    18 Reset it :
       
    19 It is sending :
       
    20 cobid : 0x703
       
    21 data : 00
       
    22 
       
    23  1 - Wants to generate SYNC every 10 milliseconds
       
    24 
       
    25 1a - put the value (4 bytes) : 0x00002710 in its dictionary 
       
    26 index 0x1006, subindex 0x00 :
       
    27 
       
    28 CAN message (SDO) : 
       
    29 cobid : 0x603
       
    30 data : 23 06 10 00 10 27 00 00
       
    31 (put 23 to transmit a data of 4 bytes
       
    32      27                       3 bytes
       
    33      2B                       2 bytes
       
    34      2F                       1 byte
       
    35 )
       
    36 
       
    37 The node is responding :
       
    38 cobid : 0x583
       
    39 data : 60 06 10 00 00 00 00 00
       
    40 
       
    41 1b - put the value (4 bytes) : 0x40000080 at index 0x1005, subindex 0x00
       
    42 to start the SYNC : 
       
    43 cobid : 0x603
       
    44 data : 23 05 10 00 80 00 00 40
       
    45 
       
    46 The node is responding :
       
    47 cobid : 0x583
       
    48 data : 60 05 10 00 00 00 00 00
       
    49 
       
    50  2 - Put the node in operational mode
       
    51 CAN message (NMT) :
       
    52 cobid : 0x00
       
    53 data : 01 03
       
    54 
       
    55 The node is sending the SYNC every 10 ms
       
    56 
     6 
    57 
     7 
    58 Nota
     8 Status of the code :
    59 -----
     9 ====================
    60 To stop the SYNC : 2 methods
    10 Tested with 
       
    11 - CanFestival 3 rc2 (cvs version)
       
    12 - gcc port for HC12 release 3.1
       
    13 - Microcontroler MC9S12DP256 
       
    14 on board  T-board (http://www.elektronikladen.de)
    61 
    15 
    62 1 - put 0x00000000 at index 1006 subindex 0
    16 
    63 2 - put 0x00000080 at index 1005 subindex 0 
    17 
       
    18 To build the example
       
    19 --------------------
       
    20 a) Compile CanFestival for hcs12 :
       
    21   Go to the root of CanFestival and enter
       
    22   ./configure --target=hcs12
       
    23   make clean all
       
    24 
       
    25 b) Build the example
       
    26 --------------------
       
    27  cd examples/gene_SYNC_HCS12
       
    28 
       
    29  make clean all
       
    30 
       
    31 
       
    32 What does the node ?
       
    33 ====================
       
    34 Just reset it, it should send the SYNC (cobId 0x80) every 10 ms
       
    35 Informations availables if you connect the serial port 0 to a terminal configured at 38400 8N1
       
    36 				   
       
    37 
       
    38 
       
    39 
       
    40 
       
    41 The default values :
       
    42 nodeId = 0x03
       
    43 CAN rate = 250 kbps
       
    44 Please read appli.c, these values can be modified by switch.
       
    45 
       
    46 
       
    47 If you put the node in operational state, the CAN messages received are filtered : Only the NMT and Nodeguard can be received.
       
    48 The parameters of the filter are mapped in the object dictionary, so that the filter can be configured by SDO before entering in operational state. See the object dictionary index 2015 to 2023. To have the values applied, always download at 0x2023 index 0 the value 1 before entering in operational.
       
    49 
       
    50 Read the file objdict.c to see the capabilities of the node. 
    64 
    51 
    65 
    52 
    66 
    53 
    67 
    54 
    68 
    55 
       
    56 
       
    57 
       
    58 
       
    59