2024-10-07 12:26 PM - edited 2024-10-07 12:32 PM
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.
2024-10-07 01:16 PM
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.,
2024-10-07 01:37 PM
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)
2024-10-07 03:43 PM - edited 2024-10-07 03:44 PM
Hi,
You can also browse through the ../Core/Src/stm32xxxx_it.c file to see what interrupt handlers CubeMX has setup...
Kind regards
Pedro