I thought the same. And you are correct that you inform the module that it needs to prepare for "X" size flash or memory space. But based on the J2534 document and ISO document, it indicates the chunk size can now be larger then 4095 bytes. The CAN packet itself can be between 0 to 64bytes long, but the actual size of all the multiple packets sent can be larger then 4095.antus wrote:@tazzi I dont read that the same as you describe. I think the length is the size of the total payload across multiple frames, and it is sent in smaller packets, segmented. So rather than the application layer knowing what each segement is and reassembling it in the application part of the code, it can be done by the can layer, but you still don't need to handle packets 32kb in size (and that piece of doc doesn't specify the maximum segment size, which may still be different between different interfaces similar to what we see on some current gen interfaces and J2534). So it'd be something like first frame says 128Kb payload. Second frame has a 4k payload, third frame has a 4k payload, and so on and so on, until the whole 128Kb is transmitted. Then the can layer in the pcm could reassemble it and provide the payload to the app as a single piece of data.
They had to create a custom command in J2534 4.04 that allows loading up an "extended TXD buffer" and also a "extended RXD buffer" that handles these larger frames.
The document goes further to demonstrate how the new system works on the protocol level.. where an example frame could be:
7E0 10 00 01 02 03 04 00 00
7E8 30 00 00
7E0 21 11 22 33 44 55 66 77
7E0 22 88 99 AA BB CC DD EE
Where 01020304 would be the length, and the data bytes would be: 11 22 33 44 55 66 77 88 99 AA BB CC DD EE.
Its basically identical to how a 4095 chunk would be sent, except the length bytes at the top are done differently to allow for a 4byte length, plus each packet could be 64bytes at a time.
Our next generation of tools will be using the big brother processor of the current chip we use (That has triple CAN), I believe it has 512k flash and 256k ram.. so we should be golden when that time comes around.