We know the hardware can handle it for it’s mentionned in the Ref. Manual, but we didn’t know where to find an existing driver for the linux side of the RDC operation and if there was any.
Using Rpmsg on the M4 requires (at least in our use case) the RTOS to be running (Rpmsg has its dedicated task).
As the stored data of the M4 should be used for the initialization of our tasks, we have to retrieve the config BEFORE Rpmsg starts.
Thus we had the idea of using a dedicated space in the DDR as a SharedMemory for our 64kB of M4 boot-time config.
At this point, no semaphore would be really required.
But we also needed to modify this configuration from M4 side while in operation (change baudrate/protocol of a communication task for next boot, …) and read it for display purpose on A7 side. Plus, at some point in the fututre, user could edit it from A7 for next M4 boot !
All things considered, we think it’d be safer to implement a semaphore mechanism to prevent any racing condition. Thus we searched in the RM and found the semaphore possibility in the RDC.
But we only found the FreeRTOS methods, no linux driver.
Last hope : coding our own semaphore mechanism in our applications, either using some DDR bits or a shared GPIO state (we’ve quickly reviewed the SEMA4 example, this could be a solution).
Summing up :
M4 and A7 have to share a 64KB (minimum) memory space
OCRAM and TCM spaces are used by M4 code and data so we’ll likely use DDR
Both cores could access it at the same moment (one writing and the other one reading or both writing) so we need a semaphore mechanism
Rpmsg task isn’t started at the time M4 needs the config data
We’ve never created nor modified a linux driver so we’d best avoid doing it
We’d gladly hear suggestions on the matter !