cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find out which interrupts are enabled by default in STM32-M3?

hosseinam1370
Associate II

Which document can I refer to in order to understand which interrupts are enabled by default in the STM32-M3 microcontroller without manually enabling them?

In the Programming Manual, the system interrupt registers, except for NMI and HardFault, are all filled with a default value of 0x0000 0000. Is there a possibility that the following interrupts are automatically enabled without any code being written?


 i am speaking about these IRQn 's:

MemoryManagement_IRQn = -12, /*!< 4 Cortex-M3 Memory Management Interrupt */
BusFault_IRQn = -11, /*!< 5 Cortex-M3 Bus Fault Interrupt */
UsageFault_IRQn = -10, /*!< 6 Cortex-M3 Usage Fault Interrupt */
SVCall_IRQn = -5, /*!< 11 Cortex-M3 SV Call Interrupt */
DebugMonitor_IRQn = -4, /*!< 12 Cortex-M3 Debug Monitor Interrupt */
PendSV_IRQn = -2, /*!< 14 Cortex-M3 Pend SV Interrupt */
SysTick_IRQn = -1,

 

I have searched the documents, but I couldn't find a precise explanation.

3 REPLIES 3
Imen.D
ST Employee

Hello @hosseinam1370 ,

Please check the Reference Manual RM0008 for STM32F1 in the Section 10: "Interrupts and Events" that provides detailed information on the Nested Vectored Interrupt Controller (NVIC), interrupt vectors, the default state of interrupts and how to enable or disable them.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

ARM refers to these as System Handlers rather than Interrupt / IRQ Handlers.

Might want to go over the ARM TRM (Technical Reference Manuals), and interpretation/coverage of those provided by Joseph Yiu in his related Essential Cortex-Mx series books.

Some you must enable, of change settings related to desired behaviour and handling you want, say divide by zero.

The SVC instruction forces the SVCall

The MPU settings/configuration the BusFault and MemoryManagement, as I recall.

DebugMonitor probably BKPT

SysTick you have to configure, it's not counting by default (24-bit down count, with notionally two sources, often HCLK and HCLK/8)

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

Hi,

You can also browse through the ../Core/Src/stm32xxxx_it.c file to see what interrupt handlers CubeMX has setup...

Kind regards
Pedro

AI = Artificial Intelligence, NI = No Intelligence, RI = Real Intelligence.