0
\$\begingroup\$

There is a need to send 32 bit numbers between two DSPs in my application. The receiving and transmitting devices are MCUs supporting 8-bit messages.

Is there a standard way to packetize the data?

Such as:

Message - Payload

0 - start byte

1 - data

2 - data

3 - crc8

\$\endgroup\$
3
  • \$\begingroup\$ decades ago we used ADLC to address any port on the bus or SDLC .... \$\endgroup\$
    – D.A.S.
    Commented May 18, 2017 at 21:32
  • \$\begingroup\$ ADLC is the widest in use, close to your custom inflexible protocol. \$\endgroup\$
    – D.A.S.
    Commented May 18, 2017 at 21:41
  • \$\begingroup\$ note that your protocol is only 50% efficient. What data rates? and is primitive for flow control (none) or error correction , flow control \$\endgroup\$
    – D.A.S.
    Commented May 18, 2017 at 21:48

2 Answers 2

2
\$\begingroup\$

No, there is no such standard in broad use.

\$\endgroup\$
0
\$\begingroup\$

A standard that might be of use is SLIP or RFC1055. That was used centuries ago when your 9600 baud modem connected to that new Internet thing. It's proven and reliable technology for serial ports.

As written, you question is incredibly difficult to answer as we don't know if the comms is (a)synchronous and the level of error detection /handling. If you have a checksum, what happens when an error is detected? You could simply ignore the packet as UDP does. At the other end of the spectrum, you could have all the ack /nak stuff of full TCP/IP.

Can I suggest that you assume and plan for the best case scenario? Assume what is sent is received as I'm assuming that the DSPs are physically adjacent. The assumption works well for SPI comms which you might also glance at. Also consider how to deal (if at all) with beginning reception mid packet. I hope this gives you some pointers.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.