cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H7A3ZI __enable_interrupt() , __disable_interrupt() and __get_interrupt_state() function defination not found error in IAR IDE

Hiren Bhuva
Associate II

Hello Community,

I am getting no defination found error for below function for STM32H7A3ZI MCU in IAR IDE.

  • __get_interrupt_state()
  • __set_interrupt_state()
  • __enable_interrupt()
  • __disable_interrupt()

Can anyone help to understand the problem.

Thanks in Advance,

Hiren Bhuva

7 REPLIES 7

What source are you seeing these in?​

Grep source, likely in an include file.

Check for CMSIS equivalents.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
TDK
Guru

Aren't they called __enable_irq/__disable_irq?

If you feel a post has answered your question, please click "Accept as Solution".
Hiren Bhuva
Associate II

Hi @Community member​  and @TDK​ ,

Thanks for quick reply.

@Community member​ , I am looking in Source and header both the files.

@TDK​ , Yes, They are using __enable_irq() and __disable_irq(). I am not sure weather they are same or different.

If they are same, then can I use __getPRIMASK() and __setPRIMASK() functions inplace of __get_interrupt_state() and __set_interrupt_state()?

Thanks,

Hiren Bhuva

>>I am looking in Source and header both the files.

Of what project example?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Perhaps ask the people who wrote the code, or use contextual clues about how they are used in the code. The functions you're talking about are non part of the standard functions provided.
You could also search github for possible implementations.
https://github.com/search?q=__get_interrupt_state&type=code
If you feel a post has answered your question, please click "Accept as Solution".

Below is typical sequence of the calling.

iIrptState = __get_interrupt_state();

__disable_interrupt();

/// Crtiical region code

__set_interrupt_state(iIrptState);

I am trying to port the given logic for STM32 in IAR. The functions looks like internal function of IAR (Toolchain).

Ok, well sounds like you're taking some code from somewhere else. Perhaps work with the people that wrote it to better understand where those came from, or convert/wrapper with more ARM/CMSIS centric methods to achieve the same.

If they are specific or intrinsic to IAR, or some RTOS implementation, I'm sure they are documented, and supported by include files that IAR would supply, the installation of which you could search/grep to find supporting Include Files, and Libraries.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..