Skip to content

Commit

Permalink
2xx: fix the interrupt priorities
Browse files Browse the repository at this point in the history
ARM M0 supports interrupt priorities 1-3
  • Loading branch information
dexter93 committed Feb 9, 2022
1 parent 55dd5fd commit d5e4fb2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion os/hal/ports/SN32/LLD/SN32F2xx/CT/hal_pwm_lld.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/** @} */

Expand Down
2 changes: 1 addition & 1 deletion os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
7 changes: 7 additions & 0 deletions os/hal/ports/SN32/LLD/SN32F2xx/USB/hal_usb_lld.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/** @} */

/*===========================================================================*/
Expand Down

0 comments on commit d5e4fb2

Please sign in to comment.