Lakshman Rao

XGATE-HC12X shared data handling

Discussion created by Lakshman Rao on Jul 22, 2008
Latest reply on Jul 22, 2008 by Steve Mcaslan
Hi all,
Recently I moved few critical tasks to be handled by the XGATE on my MC9S12XEP100.
Basically, the XGATE thread collects the data in a shared buffer periodically.
Another periodic task on HC12X core, reads this buffer for further processing.
My question is, which is the best way to handle this data coherency, if the Hc12X thread reads the buffer while it might get updated by the periodic XGATE thread.
Semaphore is what I understand for locking shared peripherals but does it apply to shared data, I am unaware.

Please advise me any better methods for handling this.

Also is there a way to globally disable all the interrupts routed to Xgate, similar to the I bit mask on Hc12X core?


with regards,
Lak

Outcomes