git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7619 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
c7c04a2dfd
commit
e7f1c3bf72
|
@ -448,7 +448,9 @@ void usb_lld_start(USBDriver *usbp) {
|
|||
STM32_USB->CNTR = CNTR_FRES;
|
||||
/* Enabling the USB IRQ vectors, this also gives enough time to allow
|
||||
the transceiver power up (1uS).*/
|
||||
#if STM32_USB1_HP_NUMBER != STM32_USB1_LP_NUMBER
|
||||
nvicEnableVector(STM32_USB1_HP_NUMBER, STM32_USB_USB1_HP_IRQ_PRIORITY);
|
||||
#endif
|
||||
nvicEnableVector(STM32_USB1_LP_NUMBER, STM32_USB_USB1_LP_IRQ_PRIORITY);
|
||||
/* Releases the USB reset.*/
|
||||
STM32_USB->CNTR = 0;
|
||||
|
@ -473,7 +475,9 @@ void usb_lld_stop(USBDriver *usbp) {
|
|||
if (usbp->state == USB_STOP) {
|
||||
#if STM32_USB_USE_USB1
|
||||
if (&USBD1 == usbp) {
|
||||
#if STM32_USB1_HP_NUMBER != STM32_USB1_LP_NUMBER
|
||||
nvicDisableVector(STM32_USB1_HP_NUMBER);
|
||||
#endif
|
||||
nvicDisableVector(STM32_USB1_LP_NUMBER);
|
||||
STM32_USB->CNTR = CNTR_PDWN | CNTR_FRES;
|
||||
rccDisableUSB(FALSE);
|
||||
|
|
|
@ -71,7 +71,8 @@
|
|||
/**
|
||||
* @brief USB1 interrupt priority level setting.
|
||||
*/
|
||||
#if !defined(STM32_USB_USB1_HP_IRQ_PRIORITY) || defined(__DOXYGEN__)
|
||||
#if (!defined(STM32_USB_USB1_HP_IRQ_PRIORITY) && \
|
||||
(STM32_USB1_HP_NUMBER != STM32_USB1_LP_NUMBER)) || defined(__DOXYGEN__)
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 13
|
||||
#endif
|
||||
|
||||
|
@ -95,6 +96,7 @@
|
|||
#endif
|
||||
|
||||
#if STM32_USB_USE_USB1 && \
|
||||
(STM32_USB1_HP_NUMBER != STM32_USB1_LP_NUMBER) && \
|
||||
!CORTEX_IS_VALID_KERNEL_PRIORITY(STM32_USB_USB1_HP_IRQ_PRIORITY)
|
||||
#error "Invalid IRQ priority assigned to USB HP"
|
||||
#endif
|
||||
|
|
|
@ -162,5 +162,4 @@
|
|||
*/
|
||||
#define STM32_USB_USE_USB1 TRUE
|
||||
#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
|
||||
#define STM32_USB_USB1_HP_IRQ_PRIORITY 2
|
||||
#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
*****************************************************************************
|
||||
** ChibiOS/RT HAL - USB-CDC driver demo for STM32F30x. **
|
||||
** ChibiOS/RT HAL - USB-CDC driver demo for STM32F072. **
|
||||
*****************************************************************************
|
||||
|
||||
** TARGET **
|
||||
|
||||
The demo runs on an ST STM32F3-Discovery board.
|
||||
The demo runs on an ST STM32F072B-Discovery board.
|
||||
|
||||
** The Demo **
|
||||
|
||||
The application demonstrates the use of the STM32F30x USB driver.
|
||||
The application demonstrates the use of the STM32F072 USB driver.
|
||||
|
||||
** Build Procedure **
|
||||
|
||||
|
|
Loading…
Reference in New Issue