/**
@page USBD_VCP USB Device VCP example
@verbatim
******************** (C) COPYRIGHT 2014 STMicroelectronics *******************
* @file readme.txt
* @author MCD Application Team
* @version V1.0.0
* @date 31-January-2014
* @brief Description of the USB VirtualComport Demo
******************************************************************************
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.st.com/software_license_agreement_liberty_v2
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************
@endverbatim
@par Example Description
This Demo presents the implementation of a Virtual Com Port (VCP) capability in
the STM32F072 USB device.
It illustrates an implementation of the CDC class following the PSTN subprotocol.
The VCP example allows the STM32 device to behave as a USB-to-RS232 bridge.
- On one side, the STM32 communicates with host (PC) through USB interface in Device mode.
- On the other side, the STM32 communicates with other devices (same host, other host,
other devices�) through the USART interface (RS232).
The support of the VCP interface is managed through the ST Virtual Com Port driver
available for download from www.st.com.
When the VCP application starts, the USB device is enumerated as serial communication
port and can be configured in the same way (baudrate, data format, parity, stop bit
length�).
To test this example, you can use one of the following configurations:
- Configuration 1: Connect USB cable to host and USART (RS232) to a different host
(PC or other device) or to the same host. In this case, you can open two hyperterminal-like
terminals to send/receive data to/from host to/from device.
- Configuration 2: Connect USB cable to Host and connect USART TX pin to USART
RX pin on the evaluation board (Loopback mode). In this case, you can open one
terminal (relative to USB com port or USART com port) and all data sent from this
terminal will be received by the same terminal in loopback mode. This mode is useful
for test and performance measurements.
To use a different CDC communication interface you can use the template CDC
interface provided in folder \Libraries\STM32_USB_Device_Library\Class\cdc.
@note When transferring a big file (USB OUT transfer) user has to adapt the size
of IN buffer, for more details refer to usbd_conf.h file (APP_RX_DATA_SIZE constant).
@par Hardware and Software environment
- This example runs on STM32F072xB devices
- This example has been tested with STM32072B-EVAL and can be easily tailored
to any other supported device and development board.
- STM32072B-EVAL Set-up
- Use CN4 connector to connect the board to a PC host through USB cable
- Use CN10 connector to connect the board to PC (or to another evaluation board) over
RS232 (USART) serial cable.
- Jumper JP7 should be connected in position 1-2.
- For loopback mode test: remove RS232 cable on CN10 and connect directly USART
TX and RX pins: PD5 and PD6 (with a cable or a jumper)
@par How to use it ?
+ EWARM
- Open the usbd_virtualcomport.eww workspace.
- In the workspace toolbar select the project config:
- Rebuild all files: Project->Rebuild all
- Load project image: Project->Debug
- Run program: Debug->Go(F5)
+ MDK-ARM
- Open the usbd_virtualcomport.uvproj project
- Rebuild all files: Project->Rebuild all target files
- Load project image: Debug->Start/Stop Debug Session
- Run program: Debug->Run (F5)
+ TrueSTUDO
- Open the TrueSTUDIO toolchain.
- Click on File->Switch Workspace->Other and browse to TrueSTUDIO workspace directory.
- Click on File->Import, select General->'Existing Projects into Workspace' and then click "Next".
- Browse to the TrueSTUDIO workspace directory, select the project.
- Rebuild all project files: Select the project in the "Project explorer"
window then click on Project->build project menu.
- Run program: Run->Debug (F11)
* <h3><center>© COPYRIGHT STMicroelectronics</center></h3>
*/
没有合适的资源?快使用搜索试试~ 我知道了~
STM32F042F6 USB虚拟串口例程
共951个文件
html:249个
js:201个
png:159个
5星 · 超过95%的资源 需积分: 50 101 下载量 76 浏览量
2017-04-19
08:48:57
上传
评论 1
收藏 2.5MB RAR 举报
温馨提示
STM32F042F6 USB虚拟串口例程
资源推荐
资源详情
资源评论
收起资源包目录
STM32F042F6 USB虚拟串口例程 (951个子文件)
usbd_vcp.uvguix.Administrator 136KB
usbd_msc.uvguix.Administrator 70KB
usbd_custom_hid.uvguix.Administrator 69KB
usbd_virtualcomport.STM32072B-EVAL.cspy.bat 2KB
usbd_virtualcomport.Debug.cspy.bat 2KB
usbd_custom_hid.STM32072B-EVAL.cspy.bat 2KB
usbd_msc.Debug.cspy.bat 2KB
logo.bmp 7KB
logo.bmp 7KB
stm32f0xx_tim.c 130KB
stm32f0xx_rtc.c 93KB
stm32f0xx_usart.c 87KB
stm32f0xx_rcc.c 67KB
stm32072b_eval_cec.c 58KB
stm32f0xx_can.c 57KB
stm32f0xx_i2c.c 55KB
stm32f0xx_spi.c 52KB
stm32f0xx_adc.c 47KB
fonts.c 46KB
songutilities.c 45KB
stm32f0xx_flash.c 42KB
stm32072b_eval_lcd.c 36KB
usbd_ccid_cmd.c 33KB
stm32f0xx_dma.c 33KB
stm32072b_audio_codec.c 29KB
usbd_audio_core.c 29KB
stm32f0xx_dac.c 26KB
usbd_dfu_core.c 25KB
stm32072b_eval_spi_sd.c 24KB
stm32f0xx_cec.c 24KB
stm32072b_eval.c 23KB
stm32072b_eval_i2c_tsensor.c 21KB
stm32072b_eval_i2c_ee.c 21KB
stm32f0xx_pwr.c 20KB
stm32f0xx_gpio.c 20KB
stm32_audio_player.c 19KB
usbd_cdc_core.c 19KB
usbd_custom_hid_core.c 19KB
wavprocess.c 18KB
usbd_req.c 17KB
stm32_eval_spi_flash.c 17KB
usbd_msc_scsi.c 17KB
usb_core.c 16KB
usb_dcd.c 16KB
stm32f0xx_comp.c 15KB
usbd_ccid_core.c 15KB
mp3process.c 14KB
usbd_hid_cdc_wrapper.c 14KB
stm32f0xx_crs.c 14KB
usbd_ccid_if.c 13KB
stm32f0xx_syscfg.c 13KB
system_stm32f0xx.c 12KB
wmaprocess.c 12KB
lcd_log.c 12KB
usbd_cdc_vcp.c 12KB
usb_dcd_int.c 12KB
usbd_hid_msc_wrapper.c 11KB
stm32f0xx_iwdg.c 11KB
stm32f0xx_exti.c 11KB
stm32f0xx_crc.c 11KB
usbd_hid_core.c 10KB
system_stm32f0xx.c 10KB
system_stm32f0xx.c 10KB
system_stm32f0xx.c 10KB
stm32f0xx_wwdg.c 10KB
usbd_core.c 10KB
stm32_audio_out_if.c 9KB
usbd_msc_core.c 9KB
stm32_audio_decoders.c 9KB
usbd_msc_bot.c 8KB
usb_bsp.c 8KB
stm32_audio_in_if.c 8KB
usbd_desc.c 8KB
usbd_desc.c 8KB
usbd_desc.c 8KB
stm32f0xx_dbgmcu.c 7KB
usbd_dfu_mal.c 7KB
usbd_pwr.c 6KB
usbd_pwr.c 6KB
usbd_cdc_if_template.c 6KB
stm32f0xx_misc.c 6KB
usbd_usr.c 6KB
usbd_storage_msd.c 6KB
usbd_pwr.c 6KB
usbd_ioreq.c 5KB
wavaddon.c 5KB
usbd_storage_template.c 5KB
stm32_it.c 5KB
usb_bsp.c 5KB
usbd_flash_if.c 5KB
usbd_mem_if_template.c 4KB
app.c 4KB
usb_bsp.c 4KB
stm32_it.c 4KB
stm32_it.c 4KB
app.c 3KB
app.c 3KB
usbd_usr.c 3KB
usbd_usr.c 3KB
usb_bsp_template.c 2KB
共 951 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
- 深圳背包客2018-04-03编译通过,代码看起来不错,就是没有平台验证。
- pplower2018-12-24可以用,还不错
- Lewolf2017-11-04使用了,可以,只是在Win7嵌入式的64位驱动很麻烦,这个是win7的事情。
- 芯艺2018-11-04在官方示例中抠出来的,不错。
yiwu1114
- 粉丝: 2
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功