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