rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
interrupt_priority.h
Go to the documentation of this file.
1#pragma once
2
3// Highest priority (can even interrupt kernel): Fast EXTI input
4
5#ifdef EFI_BOOTLOADER
6 // Bootloader: use normal ChibiOS-defined interrupts
7 #define EFI_IRQ_EXTI_PRIORITY 6
8
9#else // not EFI_BOOTLOADER
10 // Not bootloader: EXTI gets maximum priority and custom interruts
11 #define EFI_IRQ_EXTI_PRIORITY CORTEX_MAXIMUM_PRIORITY
12
13 #define STM32_DISABLE_EXTI0_HANDLER
14 #define STM32_DISABLE_EXTI1_HANDLER
15 #define STM32_DISABLE_EXTI2_HANDLER
16 #define STM32_DISABLE_EXTI3_HANDLER
17 #define STM32_DISABLE_EXTI4_HANDLER
18 #define STM32_DISABLE_EXTI5_9_HANDLER
19 #define STM32_DISABLE_EXTI10_15_HANDLER
20#endif // EFI_BOOTLOADER
21
22// Fast EXTI handoff IRQ priority
23// see digital_input_exti.cpp
24// Trigger decode happens inside this interrupt
25#define EFI_IRQ_EXTI_HANDOFF_PRIORITY 3
26
27// Precise scheduling timer
28#define EFI_IRQ_SCHEDULING_TIMER_PRIORITY 4
29
30// Relatively high priority for ADC - needed for MAP sensor sampling
31#define EFI_IRQ_ADC_PRIORITY 5
32
33// Hardware UART serial
34#define EFI_IRQ_UART_PRIORITY 6
35
36#define EFI_IRQ_SYSTICK_PRIORITY 8
37
38// SDMMC and SPI, used for SD card and WiFi
39#define EFI_IRQ_SDMMC_PRIORITY 10
40#define EFI_IRQ_SPI_PRIORITY 10
41
42#define EFI_IRQ_CAN_PRIORITY 11
43
44#define EFI_IRQ_USB_PRIORITY 14