4.2.5 UART Command/Response Frame Transmission
When creating an MDFU host or client, developers make tradeoffs in their implementation. Some designs may prioritize minimizing the RAM buffer size of UART command /response frames. It is possible to compose MDFU UART command/response frames on the fly without having to store complete command/response frames in their expanded form (where reserved codes are replaced with 2-byte substitutions). The following figure shows an example algorithm for composing a response frame on the fly without storing it in its expanded form.
Other designs may want to pre-process commands and responses into UART command/response frames prior to beginning their transmission. See the section about Maximum UART Command/Response Frame Size to understand the memory requirements for storing complete expanded UART command/response frames.