Overview
========
The mailbox_mutex example shows how to use mailbox mutex.

In this example:
The core 0 sends address of shared variable to core 1 by mailbox.
Both cores trying to get mutex in while loop, after that updates shared variable
and sets mutex, to allow access other core to shared variable.

Toolchain supported
===================
- GCC ARM Embedded  8.2.1
- Keil MDK  5.27
- IAR embedded Workbench  8.32.3
- MCUXpresso  11.0.0

Hardware requirements
=====================
- Mini/micro USB cable
- LPCLPCXpresso54102 board
- Personal Computer

Board settings
==============
No special settings are required.

Prepare the Demo
================
1.  Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J6) on the board
2.  Open a serial terminal with the following settings (See Appendix A in Getting started guide for description how to determine serial port number):
    - 115200 baud rate
    - 8 data bits
    - No parity
    - One stop bit
    - No flow control
3.  First build the cm0plus program; Second build the cm4 program; Finally, download the cm4 program to the target board.
4.  Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo
================
The log below shows example output of the Mailbox mutex example in the terminal window:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mailbox mutex example
Copy CORE1 image to address: 0x20010000, size: 6728
Core0 has mailbox mutex, update shared variable to: 1
Core1 has mailbox mutex, update shared variable to: 2
Core0 has mailbox mutex, update shared variable to: 3
Core1 has mailbox mutex, update shared variable to: 4
Core0 has mailbox mutex, update shared variable to: 5
.
.
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The output without "Copy CORE1 image to address: 0x20010000, size: 6728" for MCUXpresso.
Customization options
=====================

