Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
SaGa_4641021
Level 4
Level 4
50 replies posted 100 sign-ins 50 sign-ins

Hi

I am trying to use IPC to share 2 variables between M4 and M0. I am able to share a single variable, now I need to share 2, one of them is an array (buffer for UART).

I can't find app-notes for this task. Do you have any advice ?

thanks

0 Likes
1 Solution

Thanks Rodolfo for your reply.

I created 2 functions based on the original API to allow sharing arrays.

Can I attach them here so that other members can access ?

View solution in original post

0 Likes
5 Replies

Thanks Rodolfo for your reply.

I created 2 functions based on the original API to allow sharing arrays.

Can I attach them here so that other members can access ?

0 Likes

Sure!

0 Likes
lock attach
Attachments are accessible only for community members.
SaGa_4641021
Level 4
Level 4
50 replies posted 100 sign-ins 50 sign-ins

This zip file has a template that can be used to implement IPC for several variables and arrays.

Original API method is build to accept a fixed semaphore number. The modified methods accept an additional parameter "uint8_t SEMANUM" which is the the semaphore number.

Methods that handle arrays are:

uint32_t ReadSharedVar_Arr(const uint8_t *sharedVar, uint8_t *copy, uint8_t SEMANUM, uint32_t Arr_Length)

uint32_t WriteSharedVar_Arr(const uint8_t *sharedVar, uint8_t *copy, uint8_t SEMANUM, uint32_t Arr_Length)

IPC support upto 16 channels, the code is made for 5. Follow the template and create more pipes in the "SG_ce216795_common" c and h files.

0 Likes

Thank you @SaGa_2657031 for sharing the project with the community. I'm sure this will of great use to all our users. 

Appreciate your effort 🙂

Regards,
Dheeraj

0 Likes