where : ibrtses embedded

Multipoint protocol

A sample multipoint protocol is described. It's requirements were :

Thus the datapackets were defined as :

field value meaning
1 SYN (0x16) required, as the 1st startbit is missing
2 STX (0x02) start of message
3 LEN length of the packet including STX & CRC
4 SRC ID of the sender
5 DST ID of the reciever
6

Msg

message byte
7 [data] optional data field
8 CRCHi high byte of CRC16
9 CRCLo low byte of CRC16

Each node listens to all packets and processes those adressed to itself. If broadcasting is required, the ID 0xFF may be reserved for broadcasts. The receiver interrupt is a state machine :

state  
0 idle, wait for STX
1 get LEN
2 count down
3 msg received

The main program polls for state 3. Then checks the CRC. If the CRC is wrong, the packet is discarded. If the CRC is correct, it then checks the ID and processes the packet in case the ID matches. The ID check and the CRC check may be exchanged, that may save some CPU time.

The mentioned packet format and its processing enable a save transmission on a multipoint bus system.

The next layer

A normal device, meaning a slave, sends only one or more packets when requested from the master to do so. If there is a reply to every packet, the master is able to detect a missing packet.

Required strategies :

If there are multiple masters, some administration has to be added.

Choices :

Usually a token is passed between the masters. Only the master with the token is the master of the bus at the current time. This means the master have to know each other, by a fixed ID or some other mechanism. What happens when token becomes lost ? A token recovery scheme has to be implemented.

When the network configuration is allowed to change over time, the network has to be polled from time to time, not to detect missing devices, but to find newly connected devices.

When there are more devices than ID's to be dynamically connected, a dynamic ID scheme has to be implemented.

 

embedded
home

last updated: 12.april.00





Questions ?
Suggestions?
Feedback ?






sponsored links




Copyright (99,2001) Ing.Büro R.Tschaggelar