This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5746: SMP Task Management of PROCESSOR-SDK-RTOS-AM57X

Guru 10235 points
Part Number: AM5746
Other Parts Discussed in Thread: SYSBIOS

Hello, TI Experts,

 

Our customer sent us questions about TI-RTOS(SMP) behavior on TMDSIDK574 under like below condition.

 - CCS  Version: 8.1.0.00011 + Patch(e2e.ti.com/.../2724497

 - PDK pdk_am57xx_1_0_11

 - SYSBIOS bios_6_52_00_12

 - HW AM574x IDK (http://www.tij.co.jp/tool/jp/TMDSIDK574)

 - Probe XDS100v2 USB

 

They checked the SMP behavior on TMDSIDK574.

Please refer attached pdf.

   - Two tasks are created on Core0(A15_0) like below;

       - TaskC0_T1(Pri=16) is running & Task_disable().

       - TaskC0_T2(Pri=16) is ready.  

   - Two tasks are created on Core1(A15_1) like below;

       - TaskC1_T1(Pri=16) is running & yielded.

       - TaskC1_T2(Pri=16) is running after TaskC1_T1 is yielded.

 

Question1:

   Could you tell us why TaskC1_T1 get "FALSE" by Task_enabled()?

 

Their understanding is as follows;

   - If Task_disable() for TaskC0_T1 disable SYS/BIOS task scheduler to only Core0,

     TaskC1_T1 should get "TRUE" by Task_enabled().

   - If Task_disable() for TaskC0_T1 disable SYS/BIOS task scheduler to all SMP Cores(Core0&Core1),

     TaskC1_T1 should get "FALSE" by Task_enabled() and ignore following Task_yield().

 

Question2:

   Could you tell us Task_disable() specification in SMP case?

     - Task_disable() disable SYS/BIOS task scheduler to only Core0?

     OR

     - Task_disable() disable SYS/BIOS task scheduler to all SMP Cores(Core0&Core1)?

   -> Which is correct?

 

Question3:

Are there any way to know the task scheduler condition which is "Task_disable or not" on each Core?

 

Best regards,

smp.pdf

  • Task_disable() acts globally and disables the task scheduler on ALL cores.

    In general, it is best to avoid calling this API because it will lead to catastrophic behavior if a blocking API is invoked while the task scheduler is disabled.

    Alan
  • Hello,

    Thank you very much for your kindness.
    I really appreciate your help.

    We understand Task_disable() disables "the task scheduler on ALL cores".
    So, our understanding is as below based on Question1 in my previous E2E post.
       - If Task_disable() for TaskC0_T1 disable SYS/BIOS task scheduler to all SMP Cores(Core0&Core1),
        TaskC1_T1 should get "FALSE" by Task_enabled() and ignore following Task_yield().

    New Question:
    Could you tell us why don't SYS/BIOS ignore following Task_yield() on TaskC1_T1?
    - Our customer tell us the behavior such as "Ready" after Task_yield() on TaskC1_T1.

    Best regards,

  • I think I need to see the code that is being referred to.

    What is "Ready" after Task_yield()?

    Disabling the task scheduler has no effect on the state of tasks. Whatever state tasks are in before calling Task_disable(), the tasks will be in those same states after calling Task_disable().

    Alan
  • Hello,

    Thank you very much for your kindness.
    I really appreciate your help.

    Our customer seems to understand the TI-RTOS behavior from your explanation.
    And they told us that the problem is solved by themselves to check their project again.

    Best regards,
  • Part Number: AM5746

    Hello, TI Experts,

     

    Our customer sent us additional questions about "how to disable task" with PROCESSOR-SDK-RTOS-AM57X from the below E2E-thread.

    https://e2e.ti.com/support/processors/f/791/p/740831/2738753#2738753

     

    Question:

    1: Could you tell us more detail about "catastrophic behavior" which you said?

    2: Could you tell us the recommended way of "disabling Task-dispatch"?

    3: Could you tell us the recommended way of "how to know Task-dispatch is disabling or not"?

     

    Best regards,

  • Hi Matusan,

    Can you please start a new thread? It makes management of the forum much easier when a thread handles one question instead a string of them.

    Thanks,
    Todd