Some fixes to work with F103 again
This commit is contained in:
+17
-17
@@ -126,27 +126,27 @@ to exclude the API function. */
|
|||||||
#define INCLUDE_xTaskGetSchedulerState 1
|
#define INCLUDE_xTaskGetSchedulerState 1
|
||||||
|
|
||||||
///* Cortex-M specific definitions. */
|
///* Cortex-M specific definitions. */
|
||||||
//#ifdef __NVIC_PRIO_BITS
|
|
||||||
// /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
|
|
||||||
// #define configPRIO_BITS __NVIC_PRIO_BITS
|
|
||||||
//#else
|
|
||||||
// #define configPRIO_BITS 4
|
|
||||||
//#endif
|
|
||||||
#define configPRIO_BITS __NVIC_PRIO_BITS
|
|
||||||
|
|
||||||
#if (__CORTEX_M>=3)
|
#if (__CORTEX_M>=3)
|
||||||
/* The lowest interrupt priority that can be used in a call to a "set priority"
|
// This is for F103+
|
||||||
function. */
|
|
||||||
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
|
|
||||||
|
|
||||||
/* The highest interrupt priority that can be used by any interrupt service
|
/* The lowest interrupt priority that can be used in a call to a "set priority"
|
||||||
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
|
function. */
|
||||||
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
|
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15
|
||||||
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
|
|
||||||
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
|
#define configPRIO_BITS 4
|
||||||
|
|
||||||
|
/* The highest interrupt priority that can be used by any interrupt service
|
||||||
|
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
|
||||||
|
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
|
||||||
|
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
|
||||||
|
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
|
||||||
#else
|
#else
|
||||||
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 3
|
// This is for F072
|
||||||
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 3
|
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 3
|
||||||
|
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 3
|
||||||
|
|
||||||
|
#define configPRIO_BITS 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Interrupt priorities used by the kernel port layer itself. These are generic
|
/* Interrupt priorities used by the kernel port layer itself. These are generic
|
||||||
|
|||||||
@@ -82,8 +82,13 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* pcdHandle)
|
|||||||
__HAL_RCC_USB_CLK_ENABLE();
|
__HAL_RCC_USB_CLK_ENABLE();
|
||||||
|
|
||||||
/* Peripheral interrupt init */
|
/* Peripheral interrupt init */
|
||||||
|
#if defined(GEX_PLAT_F103_BLUEPILL)
|
||||||
|
HAL_NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 5, 0);
|
||||||
|
HAL_NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn);
|
||||||
|
#elif defined(GEX_PLAT_F072_DISCOVERY)
|
||||||
HAL_NVIC_SetPriority(USB_IRQn, 3, 0);
|
HAL_NVIC_SetPriority(USB_IRQn, 3, 0);
|
||||||
HAL_NVIC_EnableIRQ(USB_IRQn);
|
HAL_NVIC_EnableIRQ(USB_IRQn);
|
||||||
|
#endif
|
||||||
/* USER CODE BEGIN USB_MspInit 1 */
|
/* USER CODE BEGIN USB_MspInit 1 */
|
||||||
|
|
||||||
/* USER CODE END USB_MspInit 1 */
|
/* USER CODE END USB_MspInit 1 */
|
||||||
@@ -101,7 +106,11 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef* pcdHandle)
|
|||||||
__HAL_RCC_USB_CLK_DISABLE();
|
__HAL_RCC_USB_CLK_DISABLE();
|
||||||
|
|
||||||
/* Peripheral interrupt Deinit*/
|
/* Peripheral interrupt Deinit*/
|
||||||
|
#if defined(GEX_PLAT_F103_BLUEPILL)
|
||||||
|
HAL_NVIC_DisableIRQ(USB_LP_CAN1_RX0_IRQn);
|
||||||
|
#elif defined(GEX_PLAT_F072_DISCOVERY)
|
||||||
HAL_NVIC_DisableIRQ(USB_IRQn);
|
HAL_NVIC_DisableIRQ(USB_IRQn);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* USER CODE BEGIN USB_MspDeInit 1 */
|
/* USER CODE BEGIN USB_MspDeInit 1 */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user