]> rtime.felk.cvut.cz Git - pes-rpp/rpp-test-sw.git/blob - commands/fray_demo.txt
02b563810eeeb682a88de3478746f07ea166aa69
[pes-rpp/rpp-test-sw.git] / 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
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 0x0 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 A 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 max0x40 single ppi0 int0
48         frbtcfgbufD1  slot10 A cyc0 rx max0x40 single ppi0 int0
49         ## RX FIFO buffer
50         #                  dpt ch  cyc  pl  rnf rsf fid
51         frbtconfigfifo 0x5 0x2 0x0 0x20 0x1 0x0 0x0
52         # FlexRay start
53         frbtinitU
54         frbtstart
55         frbtallslots
56
57         #Node B configuration
58         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
59         frbtconfignode 0x0 0x0 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
60         ## Stat buffer TX - continuous mode
61         frbtcfgbufS0 slot2 AB cyc0 tx max9 continuous ppi0 int1
62         ## Receiving stat buffer from A
63         frbtcfgbufS1 slot1 AB cyc0 rx max9 continuous ppi0 int1
64         ## Buffer sending to FIFO in node A
65         frbtcfgbufS2 slot6 A cyc0 tx max9 single ppi0 int1
66         ## NM vector sending and receiving
67         frbtcfgbufS3 slot4 AB cyc0 rx max9 continuous ppi1 int1
68         frbtcfgbufS4 slot5 AB cyc0 tx max9 continuous ppi1 int1
69         ## Dynamic buffers for TX and RX, single shot mode
70         frbtcfgbufD0  slot9  A cyc0 rx max0x40 single ppi0 int0
71         frbtcfgbufD1  slot10 A cyc0 tx max0x40 single ppi0 int0
72         ## RX FIFO buffer
73     #              dpt ch  cyc  pl  rnf rsf fid
74         frbtconfigfifo 0x5 0x2 0x0 0x20 0x1 0x0 0x0
75         # FlexRay start
76         frbtinitU
77         frbtstart
78         frbtallslots
79
80         #Node C configuration (receive network management)
81         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
82         frbtconfignode 0x0 0x0 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
83         ## Stat buffer TX - continuous mode
84         ## NM vector sending and receiving
85         frbtcfgbufS0 slot7 AB cyc0 tx max9 continuous ppi0 int1
86         frbtcfgbufS1 slot4 AB cyc0 rx max9 continuous ppi1 int1
87         frbtcfgbufS2 slot5 AB cyc0 rx max9 continuous ppi1 int1
88         # FlexRay start
89         frbtinitU
90         frbtstart
91         frbtallslots
92
93         # NM Vector demo
94         frbtnmwatch
95
96 Test static segment:
97 --------------------
98 Starts sending a message from A in every cycle in Slot 1. The message is received by node B.
99 After the message is sent from A, When the frbtreceive1 command on the node B is called every
100 communication cycle after slot 1 has passed, the newly received message should be retrieved.
101 Node A:
102         frbttransmit1 AA BB CC
103 Node B:
104         frbtreceive1
105
106 Test dynamic segment:
107 --------------------
108 Sends a message from node A in slot 9, which is in dynamic segment of the communication cycle.
109 The buffer for this slot is configured as single-shot mode, so the message is sent only once.
110 The message is received by node B. When the command frbtreceive9 is called after the message was
111 sent from the A node, the newly received message should be retrieved. Every later calling should
112 return with a 'No message received'.
113 Node A:
114         frbttransmit9 99 99 99 99 99
115 NodeB:
116         frbtreceive9
117
118 Test FIFO:
119 --------------------
120 Sends 6 messages from node A in the slot 3, which is in static segment of the communication cycle.
121 Node B is configured to receive messages from slot 3 in a FIFO RX buffer. The FIFO has storage space
122 for 5 messages, which means that the first message will be thrown away.
123 Calling the frbtreceive0 command 5 times after all messages were sent from node A should retrieve the
124 last 5 received messages. First 4 calling should return with 'More messages are still in FIFO', the last
125 calling should return with 'Received message'. Every later calling should return with the
126 'No message received'.
127 Node A:
128         frbttransmit3 12 12 12 12 12
129         frbttransmit3 34 34 34 34 34
130         frbttransmit3 56 56 56 56 56
131         frbttransmit3 78 78 78 78 78
132         frbttransmit3 90 90 90 90 90
133         frbttransmit3 AB AB AB AB AB
134 Node B:
135         frbtreceive0
136
137 Test Network management vector:
138 --------------------
139 Starts sending a network management vector. The vector has to be manualy sent by the command frbttransmit4
140 from the node A. It is then received and processed automaticaly by the node B. Processed network management
141 vector can be obtained by calling the command frbtnmvector on the node B.
142 Node A:
143         frbttransmit4 FF 00 00 00 00 00 00 00 00 00 00 00
144 Node B:
145         frbttransmit5 00 FF 00 00 00 00 00 00 00 00 00 00
146 Node C:
147         frbtnmvector
148
149 Canceling continuous TX:
150 --------------------
151 When message was sent on the slot 4 ba calling the command frbttransmit4 on the node A and buffer assigned to
152 the slot 4 is configured as continuous mode, it can be canceled by calling the command frbtcanceltx4 on the node A.
153 If the frbtreceive4 command is called on the node B after message was sent for the first time from the node A, it
154 shoud retrieved the newly received message.
155 If the frbtreceive4 command is called after frbtcanceltx4, the last received message should be retrieved and for
156 later calling it should return with 'No message received'.
157 Node A:
158         frbttransmit4 12 34 56 78 90 AB CD EF EE EE EE EE
159         frbtcanceltx4
160 Node B:
161         frbtreceive4
162
163 Three nodes test
164 ===========================================
165 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.
166 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.
167 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.
168         #Node A configuration
169         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
170         frbtconfignode 0x0 0x0 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
171         ## Stat buffer TX
172         frbtcfgbufS0 slot1 AB cyc0 tx max9 continuous ppi0 int1
173         frbtcfgbufS1 slot4 AB cyc0 tx max9 single ppi0 int1
174         ## Stat buffer RX
175         frbtcfgbufS2 slot5 AB cyc0 rx max9 single ppi0 int1
176         # FlexRay start
177         frbtinitU
178         frbtstart
179         frbtallslots
180
181         #Node B configuration
182         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
183         frbtconfignode 0x0 0x0 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
184         ## Stat buffer TX
185         frbtcfgbufS0 slot2 AB cyc0 tx max9 continuous ppi0 int1
186         frbtcfgbufS1 slot5 AB cyc0 tx max9 single ppi0 int1
187         ## Stat buffer RX
188         frbtcfgbufS2 slot4 AB cyc0 rx max9 single ppi0 int1
189         ## RX FIFO buffer
190         #              dpt ch  cyc  pl  rnf rsf fid
191         frbtconfigfifo 0x5 0x2 0x0 0x20 0x1 0x0 0x0
192         # FlexRay start
193         frbtinitU
194         frbtstart
195         frbtallslots
196
197         #Node C configuration
198         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
199         frbtconfignode 0x0 0x0 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
200         ## Stat buffer TX
201         frbtcfgbufS0 slot3 AB cyc0 tx max9 continuous ppi0 int1
202         frbtcfgbufS1 slot6 A cyc0 tx max9 single ppi0 int1
203         ## Stat buffer RX
204         frbtcfgbufS2 slot4 AB cyc0 rx max9 single ppi0 int1
205         # FlexRay start
206         frbtinitU
207         frbtstart
208         frbtallslots
209
210 Test of the broadcast
211 --------------------
212 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.
213 Node A:
214         frbttransmit4 AA BB CC
215 Node B:
216         frbtreceive4
217 Node C:
218         frbtreceive4
219
220 Test of the A-B exclusive communication
221 --------------------
222 Sends a message from the node B in slot 5. The message should be received only by node A.
223 Node B:
224         frbttransmit5 BB AA
225 Node A:
226         frbtreceive5
227 Node C:
228         frbtreceive5
229
230 Test of the B-C exclusive communication and the FIFO RX buffer
231 --------------------
232 Sends a messages from the node C in slot 6. 5 latest messages should be received only by node B.
233 Node C:
234         frbttransmit6 CC BB 01
235         frbttransmit6 CC BB 02
236         frbttransmit6 CC BB 03
237         frbttransmit6 CC BB 04
238         frbttransmit6 CC BB 05
239         frbttransmit6 CC BB 06
240 Node A:
241         frbtreceive0
242 Node B:
243         frbtreceive0
244         frbtreceive0
245         frbtreceive0
246         frbtreceive0
247         frbtreceive0
248         frbtreceive0