Projekt

Allgemein

Profil

MMP » Historie » Version 11

Maximilian Seesslen, 09.09.2024 17:27

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