Add support to USB Device on STM32F103-Minimum board

This commit is contained in:
Alan Carvalho de Assis 2017-03-02 09:36:05 -06:00 committed by Gregory Nutt
parent 28d3344ac2
commit f1341dad9c
3 changed files with 50 additions and 2 deletions

View File

@ -13,6 +13,8 @@ Contents
- Timer Inputs/Outputs
- Using 128KiB of Flash instead of 64KiB
- Quadrature Encoder
- SDCard support
- USB Console support
- STM32F103 Minimum - specific Configuration Options
- Configurations
@ -305,6 +307,48 @@ SDCard support:
PA5, MOSI to PA7 and MISO to PA6. Note: some chinese boards use MOSO instead
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
==================================================

View File

@ -89,4 +89,8 @@ ifeq ($(CONFIG_WL_NRF24L01),y)
CSRCS += stm32_wireless.c
endif
ifeq ($(CONFIG_USBDEV),y)
CSRCS += stm32_usbdev.c
endif
include $(TOPDIR)/configs/Board.mk

View File

@ -1,7 +1,7 @@
/************************************************************************************
* 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>
* Laurent Latil <laurent@latil.nom.fr>
*
@ -60,7 +60,7 @@
* Name: stm32_usbinitialize
*
* 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.
*
************************************************************************************/