mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 13:01:10 +02:00
stm32/irq: Change SPI IRQ priority to be higher than DMA IRQ.
On STM32H5/STM32H7, SPI flash cannot use as storage device with DMA. SPI interruption may not be genearated even if DMA transfer has been done. This is due to lower priority of SPI interruption than DMA. This commit changes SPI interrupt priority more higher than DMA's priority. Signed-off-by: Yuuki NAGAO <wf.yn386@gmail.com>
This commit is contained in:
committed by
Damien George
parent
168e2c8f66
commit
f3c56c81ea
@@ -155,6 +155,9 @@ static inline void restore_irq_pri(uint32_t state) {
|
||||
// SDIO must be higher priority than DMA for SDIO DMA transfers to work.
|
||||
#define IRQ_PRI_SDIO NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 4, 0)
|
||||
|
||||
// SPI must be higher priority than DMA for SPI DMA transfers to work.
|
||||
#define IRQ_PRI_SPI NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 4, 0)
|
||||
|
||||
// DMA should be higher priority than USB, since USB Mass Storage calls
|
||||
// into the sdcard driver which waits for the DMA to complete.
|
||||
#define IRQ_PRI_DMA NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 5, 0)
|
||||
@@ -172,8 +175,6 @@ static inline void restore_irq_pri(uint32_t state) {
|
||||
|
||||
#define IRQ_PRI_SUBGHZ_RADIO NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 8, 0)
|
||||
|
||||
#define IRQ_PRI_SPI NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 8, 0)
|
||||
|
||||
#define IRQ_PRI_HSEM NVIC_EncodePriority(NVIC_PRIORITYGROUP_4, 10, 0)
|
||||
|
||||
// Interrupt priority for non-special timers.
|
||||
|
Reference in New Issue
Block a user