1. Introduction[edit source]
As described in the Coprocessor_management_overview article RPMsg protocol is proposed in the STM32MPU Embedded Software distribution for the communications between the Cortex-A and the Cortex-M.
It is important to understand that the RPmsg protocol has not be designed to transfer high rate stream. In consequence , the implementation of a ufeature relied on the RPMsg protocol have to be designed depending on the use case constraints:
- For Control and low rate data exchange RPMsg is sufficient for the data transfer.
- For high rate transfer, DMA transfer or real time constraint the indrect buffer exchange mode should be preferred.
2. RPMSG protocol awarness[edit source]
The RPMsg relying on the virtio framework provides an basic transport layer based on a shared ring buffer:
- The buffers are pre-negociated (size , number of buffers)
- No direct access to these buffers (a.e. DMA), they are filled by a copy.
- No bandwidth guaranty. Buffers can be shared between several RPMsg clients.
If the size of the buffers is hardcoded ( 512 bytes) it is possible to customize the number of buffers used. Acting on this parameter will impact the number of buffers allocated in both direction. Associated to a RPmsg transfer a doorbel signal is sent to the destination processor via the stm32 IPCC mailbox. generating an IRQ for each message transfer.
3. Direct Buffer exchange mode[edit source]
This mode consists in using the RPMsg buffer to transfer the data beween the processor. it is recommended for control message or to exchange low data rate stream.
- The RPMsg message contains effective data.
- Memory allocation is limited to the RPMsg buffers allocation.
- RPmsg client implementation is quite straight forward in term of code implementation( one service to send, one callback to receive messages).
Please refer to List of Availables Projects and have a look into OpenAMP_TTY_echo application sample
4. Indirect buffer exchange[edit source]
This mode also called Big Data mode consists in using RPMsg to carry references to some other buffers that contains the