diff --git a/os/hal/ports/SN32/LLD/SN32F2xx/CT/hal_pwm_lld.h b/os/hal/ports/SN32/LLD/SN32F2xx/CT/hal_pwm_lld.h index 61162df63c..7c6ea68958 100644 --- a/os/hal/ports/SN32/LLD/SN32F2xx/CT/hal_pwm_lld.h +++ b/os/hal/ports/SN32/LLD/SN32F2xx/CT/hal_pwm_lld.h @@ -61,7 +61,7 @@ * @brief PWMD1 interrupt priority level setting. */ #if !defined(SN32_PWM_CT16B1_IRQ_PRIORITY) || defined(__DOXYGEN__) -#define SN32_PWM_CT16B1_IRQ_PRIORITY 3 +#define SN32_PWM_CT16B1_IRQ_PRIORITY 2 #endif /** @} */ diff --git a/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.c b/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.c index d54684aa49..863a7f1ea9 100644 --- a/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.c +++ b/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.c @@ -653,7 +653,7 @@ void usb_lld_start(USBDriver *usbp) { #if PLATFORM_USB_USE_USB1 == TRUE if (&USBD1 == usbp) { USB_Init(); - nvicEnableVector(SN32_USB_NUMBER, 14); + nvicEnableVector(SN32_USB_NUMBER, SN32_USB_IRQ_PRIORITY); } #endif } diff --git a/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.h b/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.h index 5f0a230b9b..46437cd600 100644 --- a/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.h +++ b/os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.h @@ -65,6 +65,13 @@ #if !defined(PLATFORM_USB_USE_USB1) || defined(__DOXYGEN__) #define PLATFORM_USB_USE_USB1 TRUE #endif + +/** + * @brief USB interrupt priority level setting. + */ +#if !defined(SN32_USB_IRQ_PRIORITY) || defined(__DOXYGEN__) +#define SN32_USB_IRQ_PRIORITY 3 +#endif /** @} */ /*===========================================================================*/