Add support to USB Device on STM32F103-Minimum board
This commit is contained in:
parent
28d3344ac2
commit
f1341dad9c
@ -13,6 +13,8 @@ Contents
|
|||||||
- Timer Inputs/Outputs
|
- Timer Inputs/Outputs
|
||||||
- Using 128KiB of Flash instead of 64KiB
|
- Using 128KiB of Flash instead of 64KiB
|
||||||
- Quadrature Encoder
|
- Quadrature Encoder
|
||||||
|
- SDCard support
|
||||||
|
- USB Console support
|
||||||
- STM32F103 Minimum - specific Configuration Options
|
- STM32F103 Minimum - specific Configuration Options
|
||||||
- Configurations
|
- Configurations
|
||||||
|
|
||||||
@ -305,6 +307,48 @@ SDCard support:
|
|||||||
PA5, MOSI to PA7 and MISO to PA6. Note: some chinese boards use MOSO instead
|
PA5, MOSI to PA7 and MISO to PA6. Note: some chinese boards use MOSO instead
|
||||||
of MISO.
|
of MISO.
|
||||||
|
|
||||||
|
USB Console support:
|
||||||
|
====================
|
||||||
|
|
||||||
|
The STM32F103C8 has a USB Device controller, then we can use NuttX support
|
||||||
|
to USB Device. We can the console over USB enabling these options:
|
||||||
|
|
||||||
|
System Type --->
|
||||||
|
STM32 Peripheral Support --->
|
||||||
|
[*] USB Device
|
||||||
|
|
||||||
|
It will enable: CONFIG_STM32_USB=y
|
||||||
|
|
||||||
|
Board Selection --->
|
||||||
|
-*- Enable boardctl() interface
|
||||||
|
[*] Enable USB device controls
|
||||||
|
|
||||||
|
It will enable: CONFIG_BOARDCTL_USBDEVCTRL=y
|
||||||
|
|
||||||
|
Device Drivers --->
|
||||||
|
-*- USB Device Driver Support --->
|
||||||
|
[*] USB Modem (CDC/ACM) support --->
|
||||||
|
|
||||||
|
It will enable: CONFIG_CDCACM=y and many default options.
|
||||||
|
|
||||||
|
Device Drivers --->
|
||||||
|
-*- USB Device Driver Support --->
|
||||||
|
[*] USB Modem (CDC/ACM) support --->
|
||||||
|
[*] CDC/ACM console device
|
||||||
|
|
||||||
|
It will enable: CONFIG_CDCACM_CONSOLE=y
|
||||||
|
|
||||||
|
Device Drivers --->
|
||||||
|
[*] Serial Driver Support --->
|
||||||
|
Serial console (No serial console) --->
|
||||||
|
(X) No serial console
|
||||||
|
|
||||||
|
It will enable: CONFIG_NO_SERIAL_CONSOLE=y
|
||||||
|
|
||||||
|
After flashing the firmware in the board, unplug and plug it in the computer
|
||||||
|
and it will create a /dev/ttyACM0 device in the Linux. Use minicom with this
|
||||||
|
device to get access to NuttX NSH console (press Enter three times to start)
|
||||||
|
|
||||||
STM32F103 Minimum - specific Configuration Options
|
STM32F103 Minimum - specific Configuration Options
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
|
@ -89,4 +89,8 @@ ifeq ($(CONFIG_WL_NRF24L01),y)
|
|||||||
CSRCS += stm32_wireless.c
|
CSRCS += stm32_wireless.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_USBDEV),y)
|
||||||
|
CSRCS += stm32_usbdev.c
|
||||||
|
endif
|
||||||
|
|
||||||
include $(TOPDIR)/configs/Board.mk
|
include $(TOPDIR)/configs/Board.mk
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* configs/stm32f103-minimum/src/stm32_usbdev.c
|
* configs/stm32f103-minimum/src/stm32_usbdev.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2016-2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
* Laurent Latil <laurent@latil.nom.fr>
|
* Laurent Latil <laurent@latil.nom.fr>
|
||||||
*
|
*
|
||||||
@ -60,7 +60,7 @@
|
|||||||
* Name: stm32_usbinitialize
|
* Name: stm32_usbinitialize
|
||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* Called to setup USB-related GPIO pins for the Hy-Mini STM32v board.
|
* Called to setup USB-related GPIO pins for the STM32F103 Minimum board.
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user