2xx: fix the interrupt priorities

ARM M0 supports interrupt priorities 1-3
This commit is contained in:
Dimitris Mantzouranis 2022-02-09 13:06:56 +02:00
parent 9b0191220f
commit 3821ef39ca
3 changed files with 9 additions and 2 deletions

View File

@ -61,7 +61,7 @@
* @brief PWMD1 interrupt priority level setting. * @brief PWMD1 interrupt priority level setting.
*/ */
#if !defined(SN32_PWM_CT16B1_IRQ_PRIORITY) || defined(__DOXYGEN__) #if !defined(SN32_PWM_CT16B1_IRQ_PRIORITY) || defined(__DOXYGEN__)
#define SN32_PWM_CT16B1_IRQ_PRIORITY 3 #define SN32_PWM_CT16B1_IRQ_PRIORITY 2
#endif #endif
/** @} */ /** @} */

View File

@ -653,7 +653,7 @@ void usb_lld_start(USBDriver *usbp) {
#if PLATFORM_USB_USE_USB1 == TRUE #if PLATFORM_USB_USE_USB1 == TRUE
if (&USBD1 == usbp) { if (&USBD1 == usbp) {
USB_Init(); USB_Init();
nvicEnableVector(SN32_USB_NUMBER, 14); nvicEnableVector(SN32_USB_NUMBER, SN32_USB_IRQ_PRIORITY);
} }
#endif #endif
} }

View File

@ -65,6 +65,13 @@
#if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__) #if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__)
#define PLATFORM_USB_USE_USB1 TRUE #define PLATFORM_USB_USE_USB1 TRUE
#endif #endif
/**
* @brief USB interrupt priority level setting.
*/
#if !defined(SN32_USB_IRQ_PRIORITY) || defined(__DOXYGEN__)
#define SN32_USB_IRQ_PRIORITY 3
#endif
/** @} */ /** @} */
/*===========================================================================*/ /*===========================================================================*/