Hi rahul,
How you share data between CPU and XGATE cores?
I suppose for now that you use shared RAM. Correct?
In that case you should use synchronization tools to drive access to these data – for example hardware semaphores.
Since CAN message typically contains more than one byte, there is high chance that simultaneous XGATE write and CPU read could cause data corruption.
Semaphores could be used for driving access to peripheral, variables in RAM,…
In attachment is example how to use semaphores.
BTW: which MCU you use?
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------