WEC2013 on iMX6 all cores used RRS feed

  • Question

  • Hello,

    I use WEC 2013 on an iMX6, pure API programming, no MFC or .NET. Only one process is running and bind to core 1. Only the WndProc with a WM_TIMER, 1ms resolution, runs here.

    Core 2 is running an interpreter, core 3 a GigE-Kamera and core 4 serves SPI and SSI.

    Core 2 and 3 use sockets for communication. Running that way sometimes the message queue stopps, sometimes one or both sockets. Leaving core 4 alone, no problems found.

    How can be sure that WEC only uses core 1? The interpreter and camera and SPI must be used without interruption, not even a short one.

    Which WEC internal process runs where?On Win Desctop I use FilterDrivers for Ethernet, so I can avoid sockets. Would this decrease the system load a lot?

    Many thanks for your help

    Friday, May 20, 2016 8:17 AM

All replies

  • Hi Dirk,

    You essentially control where all other processes can run by "eating up" the other cores.  Using the SMP apis you can set affinities for your processes on the other cores (

    Specifically, has the following warning:


    Setting an affinity for a process or thread can result in threads receiving less processor time, as the system is restricted from running the threads on certain processors. In most cases, it is better to let the system select an available processor.

    If the new thread affinity does not specify the processor that is currently running the thread, the thread is rescheduled on one of the available processors.

    So playing with Affinity can have some un-intended consequences.  For example, I like to leave two cores available for the OS just in case there is a stall, the availability of a second processor can help the system recover.



    Tuesday, May 24, 2016 6:06 PM