fix stm32h743 priority with freeRTOS
This commit is contained in:
parent
c67b3a242e
commit
667eaa6dd6
|
@ -185,9 +185,13 @@ void board_init(void)
|
||||||
SystemClock_Config();
|
SystemClock_Config();
|
||||||
all_rcc_clk_enable();
|
all_rcc_clk_enable();
|
||||||
|
|
||||||
#if CFG_TUSB_OS == OPT_OS_NONE
|
|
||||||
// 1ms tick timer
|
// 1ms tick timer
|
||||||
SysTick_Config(SystemCoreClock / 1000);
|
SysTick_Config(SystemCoreClock / 1000);
|
||||||
|
|
||||||
|
#if CFG_TUSB_OS == OPT_OS_FREERTOS
|
||||||
|
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
|
||||||
|
NVIC_SetPriority(OTG_FS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||||
|
NVIC_SetPriority(OTG_HS_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GPIO_InitTypeDef GPIO_InitStruct;
|
GPIO_InitTypeDef GPIO_InitStruct;
|
||||||
|
|
|
@ -48,36 +48,41 @@
|
||||||
(CFG_TUSB_MCU == OPT_MCU_STM32L4 && defined(STM32L4_SYNOPSYS)) \
|
(CFG_TUSB_MCU == OPT_MCU_STM32L4 && defined(STM32L4_SYNOPSYS)) \
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO Support OTG_HS
|
|
||||||
// EP_MAX : Max number of bi-directional endpoints including EP0
|
// EP_MAX : Max number of bi-directional endpoints including EP0
|
||||||
// EP_FIFO_SIZE : Size of dedicated USB SRAM
|
// EP_FIFO_SIZE : Size of dedicated USB SRAM
|
||||||
#if CFG_TUSB_MCU == OPT_MCU_STM32F1
|
#if CFG_TUSB_MCU == OPT_MCU_STM32F1
|
||||||
#include "stm32f1xx.h"
|
#include "stm32f1xx.h"
|
||||||
#define EP_MAX 4
|
#define EP_MAX 4
|
||||||
#define EP_FIFO_SIZE 1280
|
#define EP_FIFO_SIZE 1280
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32F2
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32F2
|
||||||
#include "stm32f2xx.h"
|
#include "stm32f2xx.h"
|
||||||
#define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS
|
#define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS
|
||||||
#define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
|
#define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32F4
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32F4
|
||||||
#include "stm32f4xx.h"
|
#include "stm32f4xx.h"
|
||||||
#define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS
|
#define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS
|
||||||
#define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
|
#define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32H7
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32H7
|
||||||
#include "stm32h7xx.h"
|
#include "stm32h7xx.h"
|
||||||
#define EP_MAX 9
|
#define EP_MAX 9
|
||||||
#define EP_FIFO_SIZE 4096
|
#define EP_FIFO_SIZE 4096
|
||||||
// TODO The official name of the USB FS peripheral on H7 is "USB2_OTG_FS".
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
|
||||||
#include "stm32f7xx.h"
|
#include "stm32f7xx.h"
|
||||||
#define EP_MAX 6
|
#define EP_MAX 6
|
||||||
#define EP_FIFO_SIZE 1280
|
#define EP_FIFO_SIZE 1280
|
||||||
|
|
||||||
#elif CFG_TUSB_MCU == OPT_MCU_STM32L4
|
#elif CFG_TUSB_MCU == OPT_MCU_STM32L4
|
||||||
#include "stm32l4xx.h"
|
#include "stm32l4xx.h"
|
||||||
#define EP_MAX 6
|
#define EP_MAX 6
|
||||||
#define EP_FIFO_SIZE 1280
|
#define EP_FIFO_SIZE 1280
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#error "Unsupported MCUs"
|
#error "Unsupported MCUs"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "device/dcd.h"
|
#include "device/dcd.h"
|
||||||
|
|
Loading…
Reference in New Issue