How can I configure SysTick timer interrupt priority ?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I configure SysTick timer interrupt priority ?

Jump to solution
3,171 Views
kyf
Contributor V

Hello NXP team.

I've tried to config SysTick interrupt without success.

Question 1: How can I change the SysTick IRQ priority ?

I've used the two methods mentioned bellow:

1.   kyf_2-1674216968640.png

2.   kyf_3-1674216997264.png

 

Solution 2 ends in DevAsser due to the guard that exists in the RTD function.

kyf_5-1674217073007.png

My main problem is that I can't find anywhere the correct IRQnumber of SysTic. Not even in the CortexM7 documentation. The IRQn of SysTick into the "S32K344_COMMON.h" has a negative number as an enum but this IRQn can't be used in order to change the SysTick IRQ priority.

kyf_7-1674218487513.png

 

 

I've also seen into the 5.1.4 Core configuration section that the IRQ priority width configuration is 4 (This means that there is only 16 interrupt priority level).

Question 2: Can't I change the priority width configuration as I want ? Is this a fixed value or the 4 is the just the default number ??

kyf_6-1674218411904.png

 

 

 

Kind regards,

kyf.

 

 

 

 

 

 

 

 

0 Kudos
Reply
1 Solution
3,032 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi kyf,

Question 1: How can I change the SysTick IRQ priority ?

=> Because the Systick is a core interrupt. So, you can't use NVIC to change the priority of SysTick.

Unfortunately, The RTD driver didn't support functions to change the priority of core interrupts.

So, you must interact with the PRI_15 bit field in the SHPR3 ( System Handler Priority Register 3) to change the priority of SysTick.

nxf78987_0-1675252420442.png

Question 2: Can't I change the priority width configuration as I want? Is this a fixed value or the 4 is the just the default number ??

=> Yes, this a fixed value. Because the priority width equal width of the PRI_n bit field = 4 bits.

This meaning is the priority of interrupts can change from 0 to 15.

Best regards,

Dan

 

 

View solution in original post

0 Kudos
Reply
2 Replies
3,029 Views
kyf
Contributor V

Hello @DanNguyenDuy ,

Thank you for your input. I've gone throught the RTD and I've seen that it does not include prigroup register handling and either the system exception priority handling. So I've added my self.

 

It's a pity though because those stuff are free and are provided from CMSIS drivers of ARM.

 

 

Kind regards,

kyf

0 Kudos
Reply
3,033 Views
DanNguyenDuy
NXP Employee
NXP Employee

Hi kyf,

Question 1: How can I change the SysTick IRQ priority ?

=> Because the Systick is a core interrupt. So, you can't use NVIC to change the priority of SysTick.

Unfortunately, The RTD driver didn't support functions to change the priority of core interrupts.

So, you must interact with the PRI_15 bit field in the SHPR3 ( System Handler Priority Register 3) to change the priority of SysTick.

nxf78987_0-1675252420442.png

Question 2: Can't I change the priority width configuration as I want? Is this a fixed value or the 4 is the just the default number ??

=> Yes, this a fixed value. Because the priority width equal width of the PRI_n bit field = 4 bits.

This meaning is the priority of interrupts can change from 0 to 15.

Best regards,

Dan

 

 

0 Kudos
Reply