Checking Parity in ISR

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Checking Parity in ISR

560 Views
richard_bair
Contributor II

I have a similar thread regarding a serial protocol that uses mark/space parity to differentiate between broadcast messages (processed by all ColdFire devices on a network) and specific unit messages targeted to only one ColdFire device on a network.

 

By default I'm setting all ColdFire devices on the network to mark parity and the master PC can send mark parity messages that will be interpreted by all.  The master PC must address a unit and send a space parity command for a command to be processed by only a targeted/addressed unit.

 

What seems to be happening is that even after "addressing" a specific unit with a mark parity address (sent twice) the space partiy message is being interpreted by other devices.  I've tested this by sending the 2x mark address broadcast followed by a space parity message which is interpreted even if I send the incorrect address (yikes!!!).  If a unit is in mark parity and receives a space parity message could I simply have a PE bit filter?  So event though I have some overhead of calling the ISR vs. multidropmode perhaps I could make it very low overhead.

 

That is, units not addressed would be left in mark parity and although they receive the space parity message they ignore it based on a failed PE bit.  The unit that was addressed and changed to space parity would process the message as desired.

 

Again, not ideal as I still have ISR overhead but functional.  Thoughts?

 

Thanks,

Rich

Labels (1)
0 Kudos
1 Reply

400 Views
richard_bair
Contributor II

Ok, the parity error method works pretty well.  When I send the space parity messages I can "ignore" them using the PE bit.  What I don't like is that the ISR is being triggered...overhead for all units on the network when I only want to target one unit.

 

The next step I want to try is multi drop mode.  I'm going to try and setup the units in multidrop address mode with the receiver disabled.  I expect that a mark parity message will trigger the ISR and I can process mark parity messages per my protocol.  What's not clear to me is once a unit is addressed and that unit switches to multidrop data mode...I simply enable the receiver and I expect that the message will be processed by that unit only.  I will test this tomorrow.

 

Also, once the message is received by the addressed unit I want it to send a space parity message response and I don't see any transmission detail in the multidrop spec.  So I plan to try and keep the unit in multidrop data mode and then send a response before switching back to multidrop address mode and starting the cycle over.

 

More to come...

0 Kudos