Projekt

Allgemein

Profil

MMP » Historie » Version 12

Maximilian Seesslen, 09.09.2024 17:57

1 1 Maximilian Seesslen
h1. Multipacket-Strings
2
3
There should be the posssibillity to write the complete SPI-Flash even if it takes forever.
4
Not every slave needs to be able to send super big blocks. But every slave should be able to
5
send e.g. descriptions.
6
There can not be multiple transfers at the same time from one node because there is no identification.
7 11 Maximilian Seesslen
All slaves should be able to send description to multicast. Receiver should be able to sort messages.
8 12 Maximilian Seesslen
First packet can contain flags so information about acknowledge is given.
9 1 Maximilian Seesslen
10 11 Maximilian Seesslen
|_. Size    |_. Type                                                        |
11
| 0x1       | Package number (0: Data contains package count), overflowing  |
12
| 0x3       | Source                                                        |
13
| 0x4       | Data                                                          |
14 1 Maximilian Seesslen
15
h2. Header
16
17
|_. Size    |_. Type           |
18 2 Maximilian Seesslen
| 0x4       | Object           |
19 1 Maximilian Seesslen
| 0x4       | Total size       |
20 2 Maximilian Seesslen
| 0x4       | Flags            |
21 1 Maximilian Seesslen
| 0x4       | CRC32 of data    |
22
23
h2. Example: CANRec
24
25
PC requests an complete dump from single Node. Node will just stream it out.
26
27
h1. V2
28
29
|_. Size |_. Decription |_. Examples                                                       |
30
| 1      | Packet type  | Standard TDT packet                                              |
31
| 1      | Sub-Id;      | Futher index; Sub-Sensor or more specifi kind of thing to be set |
32
| 1      | Data type    | Int, Float, Time, Date, Percent, Promil, Multipacket-String      |
33
| 1      | Unit         | Hz, °C, Time, Date, PWM, CAN-ID, Name, Description, Room         |
34
| 4      | Value        | 32Bit                                                            |
35
36
h1. V3
37
38
|_. Size |_. Decription |_. Examples                                                               |
39
| 2      | Object       |                                                                          |
40
| 1      | Sub-Id;      | Flags, Subid                                                             |
41
| 1      | Unit/Type    | Hz_int, °C_centi, Time, Date, PWM_milli, CAN-ID, Name, Description, Room |
42
| 4      | Value        | 32Bit                                                                    |
43
44
h2. Flags
45
46
4 Bit multi message count
47
4 Bit multi message pos
48
49
Length in Bytes given via CAN?
50
Strings with max. 64 characters.
51
52
h2. Multimessage package
53
54
There should be the possibillity to write the complete SPI-Flash even if it takes forever.
55
Not every slave needs to be able to send super big blocks. But every slave should be able to
56
send e.g. descriptions.
57 3 Maximilian Seesslen
58
h1. V4
59
60 8 Maximilian Seesslen
Single block max.262144 bytes.
61
62 3 Maximilian Seesslen
|_. Size |_. Decription |_. Examples                                                               |
63
| 2      | Object       |                                                                          |
64
| 2      | Counter      |                                                                          |
65
| 4      | Value        | 32Bit                                                                    |
66
67
The data has to be stored in memory anyways. So one block can not be infinite large.
68
Flash has to be written block by block. One erase sektor can be 2K. Limiting the packet size to 64K is ok for writing to flash.
69 4 Maximilian Seesslen
Object: theoretically multiple blocks could be written at the same time. A slave could just send its whole SD-card.
70 6 Maximilian Seesslen
71
h2. Header
72
73 7 Maximilian Seesslen
First 0x10 Bytes are the Block header.
74 6 Maximilian Seesslen
75
|_. Size    |_. Type                          |
76 12 Maximilian Seesslen
| 0x4       | Flags                           |
77
| 0x4       | Total Size of this block        |
78 1 Maximilian Seesslen
| 0x4       | CRC32 of data                   |
79 12 Maximilian Seesslen
| 0x4       | Header version code             |
80 1 Maximilian Seesslen
| 0x4       | Command                         |
81 12 Maximilian Seesslen
| 0x4       | Address                         |
82
| ...       | Data                            |
83 9 Maximilian Seesslen
84
Commands:
85
- readout data
86
- erase application flash
87
- erase flash sector
88 7 Maximilian Seesslen
- erase external flash
89
- erase external flash sector
90
- write data
91
92 6 Maximilian Seesslen
Subaddress: e.g. flash page
93
Type: MMP1
94
95
h2. Usecase
96
97
h3. Write to flash
98
99 1 Maximilian Seesslen
Data size is 0x100. 
100
Count of blocks: 1
101
Number of blocks: 1