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
已解决! 转到解答。
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.
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.