This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1dc834efd51ebfefb1552960cda954937590eae1 Author: zhangyu117 <[email protected]> AuthorDate: Fri May 16 14:20:29 2025 +0800 arch/tricore: use SP before setting MPU stack region Read SP before setting the MPU stack region because the independent interrupt stack is not yet implemented. Signed-off-by: zhangyu117 <[email protected]> --- arch/tricore/src/common/tricore_doirq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/tricore/src/common/tricore_doirq.c b/arch/tricore/src/common/tricore_doirq.c index bab1364a9d5..b502994f73a 100644 --- a/arch/tricore/src/common/tricore_doirq.c +++ b/arch/tricore/src/common/tricore_doirq.c @@ -83,6 +83,10 @@ void tricore_doirq(void) if (*running_task != tcb) { + /* Update scheduler parameters */ + + nxsched_switch_context(*running_task, tcb); + #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously * running task is closed down gracefully (data caches dump, @@ -94,10 +98,6 @@ void tricore_doirq(void) tcb = this_task(); #endif - /* Update scheduler parameters */ - - nxsched_switch_context(*running_task, tcb); - /* Record the new "running" task when context switch occurred. * g_running_tasks[] is only used by assertion logic for reporting * crashes.
