mirror of
https://github.com/apache/nuttx.git
synced 2026-06-02 09:38:37 +08:00
Fixes to get USB working on STM32 F3
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5638 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
+250
-243
File diff suppressed because it is too large
Load Diff
@@ -84,13 +84,13 @@
|
|||||||
|
|
||||||
#ifdef CONFIG_STM32_STM32F30XX
|
#ifdef CONFIG_STM32_STM32F30XX
|
||||||
# ifdef CONFIG_STM32_USB_ITRMP
|
# ifdef CONFIG_STM32_USB_ITRMP
|
||||||
# define STM32_IRQ_USBHP STM32_IRQ_USBHP_1
|
|
||||||
# define STM32_IRQ_USBLP STM32_IRQ_USBLP_1
|
|
||||||
# define STM32_IRQ_USBWKUP STM32_IRQ_USBWKUP_1
|
|
||||||
# else
|
|
||||||
# define STM32_IRQ_USBHP STM32_IRQ_USBHP_2
|
# define STM32_IRQ_USBHP STM32_IRQ_USBHP_2
|
||||||
# define STM32_IRQ_USBLP STM32_IRQ_USBLP_2
|
# define STM32_IRQ_USBLP STM32_IRQ_USBLP_2
|
||||||
# define STM32_IRQ_USBWKUP STM32_IRQ_USBWKUP_2
|
# define STM32_IRQ_USBWKUP STM32_IRQ_USBWKUP_2
|
||||||
|
# else
|
||||||
|
# define STM32_IRQ_USBHP STM32_IRQ_USBHP_1
|
||||||
|
# define STM32_IRQ_USBLP STM32_IRQ_USBLP_1
|
||||||
|
# define STM32_IRQ_USBWKUP STM32_IRQ_USBWKUP_1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -776,11 +776,20 @@ Where <subdir> is one of the following:
|
|||||||
sercon : Connect the serial device a create /dev/ttyACM0
|
sercon : Connect the serial device a create /dev/ttyACM0
|
||||||
serdis : Disconnect the serial device.
|
serdis : Disconnect the serial device.
|
||||||
|
|
||||||
NOTE: I don't expect there serial connections/disconnections to work
|
NOTE: The serial connections/disconnections do not work as advertised.
|
||||||
well. the STM32F3Discovery board does not provide circuitry for
|
This is because the STM32F3Discovery board does not provide circuitry for
|
||||||
control for the "soft connect" USB pullup. As a result, the host PC
|
control of the "soft connect" USB pullup. As a result, the host PC
|
||||||
may not know when the USB has been logically connected or disconnected
|
does not know the USB has been logically connected or disconnected. You
|
||||||
and may not re-enumerate the device.
|
have to follow these steps to use USB:
|
||||||
|
|
||||||
|
1) Start NSH with USB disconnected
|
||||||
|
2) enter to 'sercon' command to start the CDC/ACM device, then
|
||||||
|
3) Connect the USB device to the host.
|
||||||
|
|
||||||
|
and to close the connection:
|
||||||
|
|
||||||
|
4) Disconnect the USB device from the host
|
||||||
|
5) Enter the 'serdis' command
|
||||||
|
|
||||||
4. This example can support the watchdog timer test (apps/examples/watchdog)
|
4. This example can support the watchdog timer test (apps/examples/watchdog)
|
||||||
but this must be enabled by selecting:
|
but this must be enabled by selecting:
|
||||||
@@ -807,6 +816,9 @@ Where <subdir> is one of the following:
|
|||||||
Such a configuration is useful on the stm32f3discovery which has no
|
Such a configuration is useful on the stm32f3discovery which has no
|
||||||
builtin RS-232 drivers.
|
builtin RS-232 drivers.
|
||||||
|
|
||||||
|
Status: As of this writing, this configuration has not ran properly.
|
||||||
|
There appears to be some kind of driver-related issue.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
1. This configuration uses the mconf-based configuration tool. To
|
1. This configuration uses the mconf-based configuration tool. To
|
||||||
@@ -858,6 +870,14 @@ Where <subdir> is one of the following:
|
|||||||
CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y
|
CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y
|
||||||
CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y
|
CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y
|
||||||
|
|
||||||
|
5. The STM32F3Discovery board does not provide circuitry for control of
|
||||||
|
the "soft connect" USB pullup. As a result, the host PC does not know
|
||||||
|
the USB has been logically connected or disconnected. You have to
|
||||||
|
follow these steps to use USB:
|
||||||
|
|
||||||
|
1) Start NSH with USB disconnected, then
|
||||||
|
2) Connect the USB device to the host.
|
||||||
|
|
||||||
5. By default, this project assumes that you are *NOT* using the DFU
|
5. By default, this project assumes that you are *NOT* using the DFU
|
||||||
bootloader.
|
bootloader.
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,11 @@ CONFIG_STM32_USART=y
|
|||||||
# USB Host Configuration
|
# USB Host Configuration
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# USB Device Configuration
|
||||||
|
#
|
||||||
|
# CONFIG_STM32_USB_ITRMP is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# External Memory Configuration
|
# External Memory Configuration
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user