How to work with two cores

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

How to work with two cores

1,198 Views
saida
Contributor II

hi

I.MX6 Community

Is it possible to run two standalone applications on i.mx6 dual lite on two cores independently at a time ?

because in my application i want to assign one application dedicated to one core and other to other core, this has to run both at a time.

can i do this way of coding in bare metal application or do i need any OS, even in OS how can i achieve this if my previous statement is not valid ?

any reference documents or manuals

Regards

Saida

Labels (1)
0 Kudos
4 Replies

903 Views
BiyongSUN
NXP Employee
NXP Employee

taskset is a linux application to do the affinity.

It could make a linux program running on the special core.

Of course you need to add the  isolcpus kernel parameter to iosolate one core. At the same time you need to change the interrupt mask to avoid the interrupt in this core.

These two steps make this core dedicate for you. If you don't need this core dedicate for you. You can skip these two steps. Just ask tasket to help you.

The following is the taskset running stress test on CPU1. you can  see the CPU1 is isolated and the program stess is running on this core.

taskset 2 ./stress -c 4  &

top

Mem: 58320K used, 707652K free, 0K shrd, 3784K buff, 15920K cached

CPU0:  0.0% usr  1.0% sys  0.0% nic 98.9% idle  0.0% io  0.0% irq  0.0% sirq

CPU1:  100% usr  0.0% sys  0.0% nic  0.0% idle  0.0% io  0.0% irq  0.0% sirq

CPU2:  0.0% usr  0.0% sys  0.0% nic  100% idle  0.0% io  0.0% irq  0.0% sirq

CPU3:  0.0% usr  0.0% sys  0.0% nic  100% idle  0.0% io  0.0% irq  0.0% sirq

Note: Have to point here. This is linux knowledge not i.MX. Please check the linux document for more details.

0 Kudos

903 Views
saida
Contributor II

HI

Thanks for you reply

its mean that OS is required for to run dedicated application to single core using tasket

is there any freescale documents for how to initialize single core to dedicated application using bare metal application ?

if OS is required what are the minimum hardware requirement for Nucleus RTOS which is from Mentor Graphics

Regards

Saida

0 Kudos

903 Views
BiyongSUN
NXP Employee
NXP Employee

Hi Saida,

As I mentioned, it is linux programming knowledge call "linux CPU affinity"

The tool "tasket" is also use that  APIs.


Using tasket to run a hello world is a bare metal or not for you?

For a core, it doesn't know what is running.

For  an OS, in the schedule layer. It is "bare metal" as well.

Processor affinity - Wikipedia, the free encyclopedia

Please check the linux org for documents.

0 Kudos

903 Views
Yuri
NXP Employee
NXP Employee

Hello,

Basically it is possible – please refer to the example of the following

thread for bare-metal configuration.

https://community.freescale.com/docs/DOC-103736

  As for Linux :

https://community.freescale.com/thread/376865


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos