MicrosoftDocs / azure-sphere-issues

Creative Commons Attribution 4.0 International
11 stars 8 forks source link

Communication is available between RTApps too, but this is not documented at all #306

Open breaultjean opened 1 year ago

breaultjean commented 1 year ago

Azure Sphere documentation and even code examples from MediaTek indicates communications between RTApps is feasible, but the documentation does not explain how to use this feature and what memory to use for the message ring buffer for the RT Apps.

It would be great to add these information as some apps might need coordination between the two RT Apps.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

RamanathanChinnappan-MSFT commented 1 year ago

@breaultjean I've delegated this to @CoderScribe, a content author, to review and share their valuable insights.

bawilless commented 1 year ago

@breaultjean,

Dave Glover from MSFT developed the Azure Sphere DevX library to make Azure Sphere application programming faster and easier to maintain. There are a few examples that use Inter-core messaging between the high-level and real-time applications. While there is not any detailed documentation on the feature, the code is commented and easy to follow.

DevX GitHub Link: See the intercore_generic_example

I also have some training content covering Azure Sphere and using the DevX library here: Azure Sphere Training Plan the includes content on Azure Sphere Real-Time applications that will help you through some common pitfalls that could slow you down. See items #12 for a recorded webinar on the topic and #14 for a hands-on lab.

I hope this helps, Brian

Fixed the Training Plan Link

breaultjean commented 1 year ago

Hi Brian,

Thanks for the links, I was not aware of the DevX simplified API to develop on the Azure Sphere! This is great stuff.

I think I should've included more context to my initial request. Sorry for that. I have used the IPC/Mailbox between a RT App and HL App. This is working fine and I've built many different products with it. What I am now trying to achieve is a scenario where two RT Apps communicate together without the HL App intervention. Unfortunately only one of the example allows communication between RT Apps cores, but it does not use the same 1KB ring buffer that allows bigger messages. It seems to exist... I had some discussions with MediaTek and vendors at MS, but it is not documented anywhere... or at least no one is really sure to be honest.

The necessity comes from requirements of a medical device which need the messages between the two cores to be handled in a Real Time fashion... that is not guaranteed by the HL App.

There is one example here where direct communication seems feasible, but the messages can only be couple of bytes long since the mailbox between both RTApps does not seems to benefit from the shared 1KB memory like the examples with HL App does. (https://github.com/MediaTek-Labs/mt3620_m4_software/tree/master/MT3620_M4_Sample_Code/FreeRTOS/MT3620_RTApp_FreeRTOS_MBOX)

Any idea where I could find such information?

Thanks a lot!