MCUXpresso Dual Core Project shared variables

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MCUXpresso Dual Core Project shared variables

跳至解决方案
698 次查看
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 项奖励
回复
1 解答
670 次查看
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 项奖励
回复
1 回复
671 次查看
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 项奖励
回复