This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTOS2 priority grouping

Hello,

I have adapted my last project to the new RTOS2 RTX. It works fine but I think I found a bug : 'SVC_Initialize' function in 'rtx_kernel.c' uses the priority grouping configuration but priority grouping has not been initialized previously. Moreover, because AIRCR register reset value is 0xFA05.0000 after reset, i.e. no priority grouping defined, calls to 'NVC_Init' has no effect on interrupt priorities.

I fixed this problem adding a call to 'NVIC_PriorityGroupConfig' function in 'svcRtxKernelInitialize' function before the call to 'SVC_Initialize' function as below :

...

NVIC_PriorityGroupConfig(NVIC_PriorityGroup_4); // Code added

// Initialize SVC and PendSV System Service Calls SVC_Initialize();

osRtxInfo.kernel.state = osRtxKernelReady;

EvrRtxKernelInitializeCompleted();

return osOK;
}

Parents
  • You should not add code for setting Priority Grouping into “SVC_Initialize”. The function reads the current priority grouping which might have been configured by the user or the default value after reset (which is well defined).

    User can configure priority grouping if needed (different from default value) before calling “osKernelInitialize.”

Reply
  • You should not add code for setting Priority Grouping into “SVC_Initialize”. The function reads the current priority grouping which might have been configured by the user or the default value after reset (which is well defined).

    User can configure priority grouping if needed (different from default value) before calling “osKernelInitialize.”

Children