lpcware

M4/M0 communication

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by JohnR on Tue Oct 01 18:47:14 MST 2013
Hi,

In my project using the LPC4350, M0 is used to get and integrate data over SGPIO from two ADCs. M4 is used to process and display the results.

Until today I have been using in the M4 code the statement LPC_CREG->M4TXEVENT = 0x1 to signal the M0_M4CORE_IRQHandler() in M0 to start a batch of measurements.

When this is complete M0 calls LPC_CREG->M0TXEVENT = 0x1; to signal the M0CORE_IRQHandler() in M4 that in turn starts the calculations on the received data.

In the manual, setting either of these two registers to 0x1 is supposed to have no effect, but it does certainly seem to work OK for me.

Today I replaced the LPC_CREG->M4TXEVENT and LPC_CREG->M0TXEVENT calls with __SEV() and the system still  works fine.

Could somebody please explain in the context of the LPC4350 what SEV, WFE, WFI, DMB and DSB instructions do and how they are used. Or point me to some documentation.

I have looked at the ARM site and not come away wiser so any help would be appreciated.

Thanks in advance,

John.

Outcomes