mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Use IRQ priorities defined in irqs.h
This commit is contained in:
parent
55a4b4536f
commit
06b1cfca3b
@ -1 +1 @@
|
|||||||
Subproject commit ddf394b0c776ff5905727593782b497acdec6c00
|
Subproject commit 017e420fdc99d351c05ea12c2bfa5fa9e732c3c4
|
||||||
@ -11,7 +11,7 @@
|
|||||||
#include <core_cmInstr.h>
|
#include <core_cmInstr.h>
|
||||||
|
|
||||||
#include "mp.h"
|
#include "mp.h"
|
||||||
#include "mdefs.h"
|
#include "irqs.h"
|
||||||
#include "ffconf.h"
|
#include "ffconf.h"
|
||||||
#include "diskio.h"
|
#include "diskio.h"
|
||||||
#include "systick.h"
|
#include "systick.h"
|
||||||
@ -57,7 +57,7 @@ static void dma_init(DMA_Stream_TypeDef *dma_stream, uint32_t dma_channel, uint3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Configure and enable SD IRQ Channel
|
// Configure and enable SD IRQ Channel
|
||||||
HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, 4, 0);
|
HAL_NVIC_SetPriority(DMA2_Stream3_IRQn, IRQ_DMA23_PRE_PRI, IRQ_DMA23_SUB_PRI);
|
||||||
HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
|
HAL_NVIC_EnableIRQ(DMA2_Stream3_IRQn);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ bool sdcard_power_on(void)
|
|||||||
// Configure and enable DMA IRQ Channel
|
// Configure and enable DMA IRQ Channel
|
||||||
// SDIO IRQ should have a higher priority than DMA IRQ because it needs to
|
// SDIO IRQ should have a higher priority than DMA IRQ because it needs to
|
||||||
// preempt the DMA irq handler to set a flag indicating the end of transfer.
|
// preempt the DMA irq handler to set a flag indicating the end of transfer.
|
||||||
HAL_NVIC_SetPriority(SDIO_IRQn, 3, 0);
|
HAL_NVIC_SetPriority(SDIO_IRQn, IRQ_SDIO_PRE_PRI, IRQ_SDIO_SUB_PRI);
|
||||||
HAL_NVIC_EnableIRQ(SDIO_IRQn);
|
HAL_NVIC_EnableIRQ(SDIO_IRQn);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stm32f4xx_hal.h>
|
#include <stm32f4xx_hal.h>
|
||||||
|
|
||||||
|
#include "irqs.h"
|
||||||
#include "sccb.h"
|
#include "sccb.h"
|
||||||
#include "ov9650.h"
|
#include "ov9650.h"
|
||||||
#include "ov2640.h"
|
#include "ov2640.h"
|
||||||
@ -104,7 +105,7 @@ static int dcmi_config(uint32_t jpeg_mode)
|
|||||||
__HAL_LINKDMA(&DCMIHandle, DMA_Handle, DMAHandle);
|
__HAL_LINKDMA(&DCMIHandle, DMA_Handle, DMAHandle);
|
||||||
|
|
||||||
/* Configure and enable DCMI IRQ Channel */
|
/* Configure and enable DCMI IRQ Channel */
|
||||||
HAL_NVIC_SetPriority(DCMI_IRQn, 0, 0);
|
HAL_NVIC_SetPriority(DCMI_IRQn, IRQ_DCMI_PRE_PRI, IRQ_DCMI_SUB_PRI);
|
||||||
HAL_NVIC_EnableIRQ(DCMI_IRQn);
|
HAL_NVIC_EnableIRQ(DCMI_IRQn);
|
||||||
|
|
||||||
/* Init DCMI */
|
/* Init DCMI */
|
||||||
@ -138,7 +139,7 @@ static int dma_config()
|
|||||||
DMAHandle.Init.PeriphBurst = DMA_PBURST_SINGLE; /* Peripheral burst */
|
DMAHandle.Init.PeriphBurst = DMA_PBURST_SINGLE; /* Peripheral burst */
|
||||||
|
|
||||||
/* Configure and enable DMA IRQ Channel */
|
/* Configure and enable DMA IRQ Channel */
|
||||||
HAL_NVIC_SetPriority(DMA2_Stream1_IRQn, 0, 0);
|
HAL_NVIC_SetPriority(DMA2_Stream1_IRQn, IRQ_DMA21_PRE_PRI, IRQ_DMA21_SUB_PRI);
|
||||||
HAL_NVIC_EnableIRQ(DMA2_Stream1_IRQn);
|
HAL_NVIC_EnableIRQ(DMA2_Stream1_IRQn);
|
||||||
|
|
||||||
/* Initialize the DMA stream */
|
/* Initialize the DMA stream */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user