mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-08 21:19:01 +01:00
53 lines
2.3 KiB
Plaintext
53 lines
2.3 KiB
Plaintext
IPC demo program based on mailbox
|
|
-----------------------------------------
|
|
|
|
- within the file platform_config.h the user needs to specify the system configuration.
|
|
|
|
|
|
The user can specifiy:
|
|
|
|
* which mailboxes are required (host, slave, or both)
|
|
|
|
* if the M0 memory has to be initialized to a specific value before download
|
|
|
|
* the usage of an optional 32-bit parameter for the mailboxes
|
|
|
|
* the availability of a callback function for the mailboxes
|
|
|
|
* the priority of the interrupt associated with the IPC communication
|
|
|
|
* the memory locations of the M0 code/data, buffers for M0 and M4, location of the mailboxes
|
|
|
|
* if the M4 shall download the M0 and start it via INITIALIZE_M0_IMAGE (YES/NO)
|
|
|
|
The linker scatter file needs to be consistent with the provided ROM/RAM addresses in case of changes.
|
|
|
|
Set it to NO if you want to debug the M0 application separately.
|
|
|
|
Set to YES means the M4 will reset, download, and release the M0. In this case, the debug connection could be lost.
|
|
|
|
For debugging, in this scenario the .ini file shall be modified, not to download the application but just to connect to the processor.
|
|
|
|
|
|
- according to the number of mailbox desired, if callbacks are enabled, the user has to provide a callback table within the Mx_usr_mbx_callbacks.c file.
|
|
|
|
In Mx_usr_mbx_callbacks.h file the mailbox numbering is defined. Within the callback table, each callback gets associated to the related mailbox number.
|
|
|
|
The order in the table is not important, since the callback function addresses are plugged-in at runtime by the IPC initialization routines.
|
|
|
|
|
|
- The mailbox table defined in ipc_buffer.c needs also to be updated accordingly to accomodate the desired number of mailboxes. There can be
|
|
|
|
|
|
- since the callbacks are executed within the ISR, their usage is meant for quick operations that need to be performed in reaction to the mailbox event
|
|
|
|
For normal application processing, message pending flags are provided and shall rather be used, to avoid increasing unnecessarily interrupt latency
|
|
|
|
|
|
- the type of logical messages for the mailboxes are defined within the Mx_ipc_msg.h file
|
|
|
|
|
|
- the application runs completely from RAM and exchanges messages between the processors, showing how to post and read from the mailboxes.
|
|
|
|
|
|
|