]> rtime.felk.cvut.cz Git - rpp-test-sw.git/blob - rpp-test-sw/commands/fray_demo.txt
Merge branches 'master' and 'rm48/master'
[rpp-test-sw.git] / rpp-test-sw / commands / fray_demo.txt
1 FlexRay simple test of the connection
2 ===========================================
3 This test starts a new FlaxRay network communication. Node A sends 100 messages,
4 one message each 10th communication cycle, and node B is suppose to receive all
5 of the messages correctly.
6 Node A:
7         fraytestA
8 Node B:
9         fraytestB
10
11 FlexRay motor remote controlling
12 ===========================================
13 Connection:
14         control panel is connected to the node A.
15                 black - AIN1 (Low)
16                 green - AIN1 (High)
17                 white - GND
18                 red - 12V
19                 yellow - DIN0
20                 blue - DIN1
21         DC motor is connected to the node B to the HBR outputs.
22
23 Node A:
24         demomotctrl
25 Node B:
26         demomotdrive
27 Node C
28         simulink demo fray_motor_demo
29
30 FlexRay commands example
31 ===========================================
32 Node init:
33 ------------
34         #Node A configuration
35         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
36         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
37         ## Stat buffer TX - continuous mode
38         frbtcfgbufS0 slot1 AB cyc0 tx max9 continuous ppi0 int1
39         ## Receiving stat buffer from B
40         frbtcfgbufS1 slot2 AB cyc0 rx max9 continuous ppi0 int1
41         ## Buffer sending message to FIFO in node B - single shot mode
42         frbtcfgbufS2 slot3 B cyc0 tx max9 single ppi0 int1
43         ## NM vector sending and receiving
44         frbtcfgbufS3 slot5 AB cyc0 rx max9 continuous ppi1 int1
45         frbtcfgbufS4 slot4 AB cyc0 tx max9 continuous ppi1 int1
46         ## Dynamic buffers for TX and RX, single shot mode
47         frbtcfgbufD0  slot9  A cyc0 tx max9 single ppi0 int0
48         frbtcfgbufD1  slot10 A cyc0 rx max9 single ppi0 int0
49         ## RX FIFO buffer to accept messages from all aother slots
50         frbtcfgfifo rejslot0 slotmask0 depth5 AB cyc0 max0x20 rejnull accstat
51         # FlexRay start
52         frbtinitU
53         frbtstart
54         frbtallslots
55
56         #Node B configuration
57         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
58         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
59         ## Stat buffer TX - continuous mode
60         frbtcfgbufS0 slot2 AB cyc0 tx max9 continuous ppi0 int1
61         ## Receiving stat buffer from A
62         frbtcfgbufS1 slot1 AB cyc0 rx max9 continuous ppi0 int1
63         ## Buffer sending to FIFO in node A
64         frbtcfgbufS2 slot6 A cyc0 tx max9 single ppi0 int1
65         ## NM vector sending and receiving
66         frbtcfgbufS3 slot4 AB cyc0 rx max9 continuous ppi1 int1
67         frbtcfgbufS4 slot5 AB cyc0 tx max9 continuous ppi1 int1
68         ## Dynamic buffers for TX and RX, single shot mode
69         frbtcfgbufD0  slot9  A cyc0 rx max9 single ppi0 int0
70         frbtcfgbufD1  slot10 A cyc0 tx max9 single ppi0 int0
71         ## RX FIFO buffer to accept messages from all buffers except 0x#9, 0x#B, 0x#D, 0x#F
72         frbtcfgfifo rejslot9 slotmask6 depth5 B cyc0 max0x20 rejnull accstat
73         # FlexRay start
74         frbtinitU
75         frbtstart
76         frbtallslots
77
78         #Node C configuration (receive network management)
79         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
80         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
81         ## Stat buffer TX - continuous mode
82         ## NM vector sending and receiving
83         frbtcfgbufS0 slot7 AB cyc0 tx max9 continuous ppi0 int1
84         frbtcfgbufS1 slot4 AB cyc0 rx max9 continuous ppi1 int1
85         frbtcfgbufS2 slot5 AB cyc0 rx max9 continuous ppi1 int1
86         # FlexRay start
87         frbtinitU
88         frbtstart
89         frbtallslots
90
91         # NM Vector demo
92         frbtnmwatch
93
94 Test static segment:
95 --------------------
96 Starts sending a message from A in every cycle in Slot 1. The message is received by node B.
97 After the message is sent from A, When the frbtreceive1 command on the node B is called every
98 communication cycle after slot 1 has passed, the newly received message should be retrieved.
99 Node A:
100         frbttransmit1 AA 
101 Node B:
102         frbtreceive1
103
104 Test dynamic segment:
105 --------------------
106 Sends a message from node A in slot 9, which is in dynamic segment of the communication cycle.
107 The buffer for this slot is configured as single-shot mode, so the message is sent only once.
108 The message is received by node B. When the command frbtreceive9 is called after the message was
109 sent from the A node, the newly received message should be retrieved. Every later calling should
110 return with a 'No message received'.
111 Node A:
112         frbttransmit9 99 99 99 99 99
113 NodeB:
114         frbtreceive9
115
116 Test FIFO:
117 --------------------
118 Sends 6 messages from node A in the slot 3, which is in static segment of the communication cycle.
119 Node B is configured to receive messages from slot 3 in a FIFO RX buffer. The FIFO has storage space
120 for 5 messages, which means that the first message will be thrown away.
121 Calling the frbtreceive0 command 5 times after all messages were sent from node A should retrieve the
122 last 5 received messages. First 4 calling should return with 'More messages are still in FIFO', the last
123 calling should return with 'Received message'. Every later calling should return with the
124 'No message received'.
125 Node A:
126         frbttransmit3 12 12 12 12 12
127         frbttransmit3 34 34 34 34 34
128         frbttransmit3 56 56 56 56 56
129         frbttransmit3 78 78 78 78 78
130         frbttransmit3 90 90 90 90 90
131         frbttransmit3 AB AB AB AB AB
132 Node B:
133         frbtreceive3
134
135 Test Network management vector:
136 --------------------
137 Starts sending a network management vector. The vector has to be manualy sent by the command frbttransmit4
138 from the node A. It is then received and processed automaticaly by the node B. Processed network management
139 vector can be obtained by calling the command frbtnmvector on the node B.
140 Node A:
141         frbttransmit4 FF 00 00 00 00 00 00 00 00 00 00 00
142 Node B:
143         frbttransmit5 00 FF 00 00 00 00 00 00 00 00 00 00
144 Node C:
145         frbtnmvector
146
147 Canceling continuous TX:
148 --------------------
149 When message was sent on the slot 4 ba calling the command frbttransmit4 on the node A and buffer assigned to
150 the slot 4 is configured as continuous mode, it can be canceled by calling the command frbtcanceltx4 on the node A.
151 If the frbtreceive4 command is called on the node B after message was sent for the first time from the node A, it
152 shoud retrieved the newly received message.
153 If the frbtreceive4 command is called after frbtcanceltx4, the last received message should be retrieved and for
154 later calling it should return with 'No message received'.
155 Node A:
156         frbttransmit4 12 34 56 78 90 AB CD EF EE EE EE EE
157         frbtcanceltx4
158 Node B:
159         frbtreceive4
160
161 Buffer reconfiguration example:
162 --------------------
163 Reconfigures message buffer on the node A to transmit in slot 11 channel B instead of slot 9 channel A
164 Reconfigures message buffer on the node B to receive from slot 11 channel B instead of slot 9 channel A.
165 Node A:
166         frbtreconfigurebuf id9 slot11 B cycset1 cycoffset0 max9
167 Node B:
168         frbtreconfigurebuf id9 slot11 B cycset1 cycoffset0 max9
169
170 Three nodes test
171 ===========================================
172 Node A is sending a message in single-shot mode in slot 4. This message is received by nodes B and C into the static segment RX buffer.
173 Node B is sending a message in single-shot mode in slot 5. This message is received by node A into the static segment RX buffer.
174 Node C is sending a message in single shot mode in slot 6. This message is received by node B into the FIFO RX buffer.
175         #Node A configuration
176         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
177         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
178         ## Stat buffer TX
179         frbtcfgbufS0 slot1 AB cyc0 tx max9 continuous ppi0 int1
180         frbtcfgbufS1 slot4 AB cyc0 tx max9 single ppi0 int1
181         ## Stat buffer RX
182         frbtcfgbufS2 slot5 AB cyc0 rx max9 single ppi0 int1
183         # FlexRay start
184         frbtinitU
185         frbtstart
186         frbtallslots
187
188         #Node B configuration
189         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
190         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
191         ## Stat buffer TX
192         frbtcfgbufS0 slot2 AB cyc0 tx max9 continuous ppi0 int1
193         frbtcfgbufS1 slot5 AB cyc0 tx max9 single ppi0 int1
194         ## Stat buffer RX
195         frbtcfgbufS2 slot4 AB cyc0 rx max9 single ppi0 int1
196         ## RX FIFO buffer
197         #              dpt ch  cyc  pl  rnf rsf fid
198         frbtcfgfifo rejslot0 slotmask0 depth5 AB cyc0 max0x20 rejnull accstat
199         # FlexRay start
200         frbtinitU
201         frbtstart
202         frbtallslots
203
204         #Node C configuration
205         frbtconfigcluster 0x2 0xF 0x15E0 0xF 0xF 0xC 0x15A 0x8 0xAE4 0x9 0xF 0x4 0x43 0x1 0x4 0x2 0xAE3 0x0 0x56 0xA 0x12 0x12 0x4C 0xB4 0x3C
206         frbtconfignode 0x0 0xF 0x2 0x1 0x3 0x3 0x0 0x0 0x1 0x1 0x10D 0x6 0x6 0x18 0x18 0x36B00 0xCD 0x151 0x0 0x1 0x0 0x2 0x81 0x36DA2 0x151 0x33 0x0 0x0
207         ## Stat buffer TX
208         frbtcfgbufS0 slot3 AB cyc0 tx max9 continuous ppi0 int1
209         frbtcfgbufS1 slot6 A cyc0 tx max9 single ppi0 int1
210         ## Stat buffer RX
211         frbtcfgbufS2 slot4 AB cyc0 rx max9 single ppi0 int1
212         # FlexRay start
213         frbtinitU
214         frbtstart
215         frbtallslots
216
217 Test of the broadcast
218 --------------------
219 Sends a message from node A in slot 4. The message should be received by node A and B, once on each of the nodes.
220 Node A:
221         frbttransmit4 AA BB CC
222 Node B:
223         frbtreceive4
224 Node C:
225         frbtreceive4
226
227 Test of the A-B exclusive communication
228 --------------------
229 Sends a message from the node B in slot 5. The message should be received only by node A.
230 Node B:
231         frbttransmit5 BB AA
232 Node A:
233         frbtreceive5
234 Node C:
235         frbtreceive5
236
237 Test of the B-C exclusive communication and the FIFO RX buffer
238 --------------------
239 Sends a messages from the node C in slot 6. 5 latest messages should be received only by node B.
240 Node C:
241         frbttransmit6 CC BB 01
242         frbttransmit6 CC BB 02
243         frbttransmit6 CC BB 03
244         frbttransmit6 CC BB 04
245         frbttransmit6 CC BB 05
246         frbttransmit6 CC BB 06
247 Node A:
248         frbtreceive0
249 Node B:
250         frbtreceive0
251         frbtreceive0
252         frbtreceive0
253         frbtreceive0
254         frbtreceive0
255         frbtreceive0