Hi @sathishkumar_sunmugavel, please see my answers below for S32K368 FreeRTOS SMP.
1. Yes. The affinity is used to pin the task to the core. However, it is bitwise and user can pin one task to be scheduled on several cores. That means you can set several task to both Core 0 and Core 2.
2. Yes. There should be latency for scheduler because It is natural of FreeRTOS SMP works. The scheduler is managed by one MASTER core and this MASTER core is sharing resource with other. In some cases, this MASTER core can be blocked by other. And even worse, the priority for scheduler is set to lowest (following FreeRTOS User Guide) to prioritize the real-time IRQ/task.
lequana2_1-1750933135730.png
3. The latency can be measured as it is the for loop inside FreeRTOS mechanism (task.c file). It is possible to either detect/mitigate by making minor changes inside FreeRTOS kernel. FreeRTOS is open-source, user can freely modify. However, it is out-of-scope for NXP FreeRTOS team. Because we need to deliver exactly what FreeRTOS in github.
4. The HW interrupt is also out-of-scope for FreeRTOS kernel. FreeRTOS kernel only manipulate the task but not responsible to register the IRQ handler (it is done via Real-time Driver APIs). And of course, if you want to pin the handler to specific core, you can register the IRQ in that specific core only you can register the IRQ in main.c, and have the #if to check the coreID before assign the IRQ handler.