Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

AURIX™ Development Studio Forum Discussions

User17900
Level 1
Level 1
5 questions asked First reply posted First question asked
Hi,
I am performing static code analysis for my project. We developed project in aurix development studio. In IFX_INTERRUPT(AdcIsr, 5, 2); is giving violation as missing type specifier.

#define IFX_INTERRUPT(isr, vectabNum, prio) IFX_INTERRUPT_INTERNAL(isr, vectabNum, prio)
#define IFX_INTERRUPT_INTERNAL(isr, vectabNum, prio) void __interrupt(prio) __vector_table(vectabNum) isr(void)

from this above macros if __vector_table(vectabNum) removed then there is no violation. But without this interrupt service routine can't be serviced by different cores,
default ISR getting executed in core 0.

How to fix QAC(static code analyzer) with multi core ISR.
0 Likes
1 Solution
AMG
Employee
Employee
10 sign-ins 5 replies posted 5 sign-ins

Hello,

The implementation IFX_INTERRUPT(AdcIsr, 5, 2); seems strange. As mentioned in the description of the issue, the macros is defined as: #define IFX_INTERRUPT(isr, vectabNum, prio).

  • The paramater "isr" refers to the interrupt service routine: the function to be called when the interrupt is raised.
  • The parameter "vertabNum" refers to the vector table number, in simpler words the cpu which will service the interrupt.
  • The parameter "prio" refers to the interrupt priority.

With the implementation "IFX_INTERRUPT(AdcIsr, 5, 2)" means that the interrupt service routine AdcIsr, shall be serviced by CPU5 with a priority of 2.

If the goal is to have CPU0 service the interrupt, please try changing the second parameter to 0 (as such "IFX_INTERRUPT(AdcIsr, 0, 2)"). Depending on the device being used, it could be that there is no CPU5 which causes the error seen.

Hopefully this solves this issue.

View solution in original post

0 Likes
1 Reply
AMG
Employee
Employee
10 sign-ins 5 replies posted 5 sign-ins

Hello,

The implementation IFX_INTERRUPT(AdcIsr, 5, 2); seems strange. As mentioned in the description of the issue, the macros is defined as: #define IFX_INTERRUPT(isr, vectabNum, prio).

  • The paramater "isr" refers to the interrupt service routine: the function to be called when the interrupt is raised.
  • The parameter "vertabNum" refers to the vector table number, in simpler words the cpu which will service the interrupt.
  • The parameter "prio" refers to the interrupt priority.

With the implementation "IFX_INTERRUPT(AdcIsr, 5, 2)" means that the interrupt service routine AdcIsr, shall be serviced by CPU5 with a priority of 2.

If the goal is to have CPU0 service the interrupt, please try changing the second parameter to 0 (as such "IFX_INTERRUPT(AdcIsr, 0, 2)"). Depending on the device being used, it could be that there is no CPU5 which causes the error seen.

Hopefully this solves this issue.

0 Likes