MCUXpresso Dual Core Project shared variables

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MCUXpresso Dual Core Project shared variables

Jump to solution
513 Views
eu_mtaverna
Contributor III

Hi All,

I'm working with a dual core project CM4 Master, CM0 Slave on LPC54102 microprocessor.

I need to share some variables from Master core to Slave core and viceversa. I saw the Mutex example and my question is:

Is the Mutex the only way to share variables or is possible to declare some variables to be placed at determinated adresses in RAM on both Master and Slave core in order to read/write this variables from both cores?

Thanks

0 Kudos
1 Solution
485 Views
frank_m
Senior Contributor III

I would check out what features intercommunication for multiprocessing your SDK actually implements.
Mutexes are one method.

> Is the Mutex the only way to share variables or is possible to declare some variables to be placed at determinated adresses in RAM on both Master and Slave core in order to read/write this variables from both cores?

This question sounds like you have not much experience with concurrency and multithreading/multiprocessing. I would suggest a primer like this one:
https://www.educative.io/blog/multithreading-and-concurrency-fundamentals

While in a multiprocessing environment like yours the cores actually work concurrently, the scheduler in a multithreaded system only makes the thread appear like they are processed concurrently.
The fundamental problems and concepts remain the same.

View solution in original post

0 Kudos
1 Reply
486 Views
frank_m
Senior Contributor III

I would check out what features intercommunication for multiprocessing your SDK actually implements.
Mutexes are one method.

> Is the Mutex the only way to share variables or is possible to declare some variables to be placed at determinated adresses in RAM on both Master and Slave core in order to read/write this variables from both cores?

This question sounds like you have not much experience with concurrency and multithreading/multiprocessing. I would suggest a primer like this one:
https://www.educative.io/blog/multithreading-and-concurrency-fundamentals

While in a multiprocessing environment like yours the cores actually work concurrently, the scheduler in a multithreaded system only makes the thread appear like they are processed concurrently.
The fundamental problems and concepts remain the same.

0 Kudos