/**
@page USBD_VCP USB Device VCP example
@verbatim
******************** (C) COPYRIGHT 2015 STMicroelectronics *******************
* @file readme.txt
* @author MCD Application Team
* @version V1.2.0
* @date 09-November-2015
* @brief Description of the USB Device VCP (Virtual Com Port) example
******************************************************************************
*
* 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 STM32F207xx, STM32F407xx, STM32F429xx and STM32F107xx devices.
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.
This example can be customized to communicate with interfaces other than USART.
The VCP example works in High and Full speed modes.
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 have to adapt the size
of IN buffer, for more details refer to usbd_conf.h file (APP_RX_DATA_SIZE constant).
This example works
- in high speed (HS) when the STM322xG-EVAL, the STM324xG-EVAL or the STM324x9I-EVAL
board and the USB OTG HS peripheral are used.
- in full speed (FS) when the STM322xG-EVAL, the STM324xG-EVAL or the STM324x9I-EVAL board and the
USB OTG FS peripheral are used, or when using the STM3210C-EVAL board.
- in HS-IN-FS when the STM324x9I-EVAL board and the USB OTG HS-IN-FS peripheral are used.
@par Hardware and Software environment
- This example has been tested with STM3210C-EVAL RevB (STM32F107xx devices),
STM322xG-EVAL RevB (STM32F207xx), STM324xG-EVAL RevB (STM32F407xx) and STM324x9I-EVAL RevB (STM32F429xx)
- STM3210C-EVAL Setup
- Use CN2 connector to connect the board to a PC host
- Use CN6 connector to connect the board to PC (or to another evaluation board) over
RS232 (USART) serial cable.
- Jumper JP16 should be connected in position 2-3.
- For loopback mode test: remove RS232 cable on CN6 and connect directly USART
TX and RX pins: PD5 and PD6 (with a cable or a jumper)
- STM322xG-EVAL Setup
- Use CN8 connector to connect the board to a PC host when using USB OTG FS peripheral
- Use CN9 connector to connect the board to a PC host when using USB OTG HS peripheral
- Use CN16 connector to connect the board to PC (or to another evaluation board) over
RS232 (USART) serial cable.
@note Make sure that :
- Please ensure that jumper JP31 is fitted when using USB OTG HS
- ensure that jumper JP22 is connected in position 1-2.
- For loopback mode test: remove RS232 cable on CN16 and connect directly USART
TX and RX pins: PC10 and PC11 (with a cable or a jumper)
- STM324xG-EVAL Setup
- Use CN8 connector to connect the board to a PC host when using USB OTG FS peripheral
- Use CN9 connector to connect the board to a PC host when using USB OTG HS peripheral
- Use CN16 connector to connect the board to PC (or to another evaluation board) over
RS232 (USART) serial cable.
@note Make sure that :
- Please ensure that jumper JP31 is fitted when using USB OTG HS
- ensure that jumper JP22 is connected in position 1-2.
- For loopback mode test: remove RS232 cable on CN16 and connect directly USART
TX and RX pins: PC10 and PC11 (with a cable or a jumper)
- STM324x9I-EVAL Set-up
- Use CN14 connector to connect the board to host when using USB OTG FS peripheral
- Use CN9 connector to connect the board to host when using USB OTG HS peripheral
- Use CN15 connector to connect the board to host when using USB OTG HS-IN-FS peripheral
Note that some FS signals are shared with the HS ULPI bus, so some PCB rework is needed.
For more details, refer to section "USB OTG2 HS & FS" in STM324x9I-EVAL Evaluation Board
User Manual.
@note Make sure that :
- Please ensure that jumper JP16 is not fitted when using USB OTG FS
- Use CN8 connector to connect the board to PC (or to another evaluation board) over
RS232 (USART) serial cable.
- For loopback mode test: remove RS232 cable on CN16 and connect directly USART
TX and RX pins: PC10 and PC11 (with a cable or a jumper)
@par How to use it ?
In order to make the program work, you must do the following:
- Open your preferred toolchain
- In the workspace toolbar select the project config:
- STM322xG-EVAL_USBD-HS: to configure the project for STM32F207xx devices and use USB OTG HS peripheral
- STM322xG-EVAL_USBD-FS: to configure the project for STM32F207xx devices and use USB OTG FS peripheral
- STM324xG-EVAL_USBD-HS: to configure the project for STM32F407xx devices and use USB OTG HS peripheral
- STM324xG-EVAL_USBD-FS: to configure the project for STM32F407xx devices and use USB OTG FS peripheral
- STM324x9i-EVAL_USBD-HS:to configure the project for STM32F429xx devices and use USB OTG HS peripheral
- STM324x9i-EVAL_USBD-FS:to configure the project for STM32F429xx devices and use USB OTG FS peripheral
- STM324x9i-EVAL_USBD-HS-IN-FS: to configure the project for STM32F429xx devices and use USB OTG HS-IN-FS peripheral
- STM3210C-EVAL_USBD-FS: to configure the project for STM32F107xx devices
- Rebuild all files and load your image into target memory
- Run the application
@note Known Limitations
This example retarget the C library printf() function to the EVAL board�s LCD
screen (C library I/O redirected to LCD) to display some Library and user debug
messages. TrueSTUDIO Lite version does not support I/O redirection, and instead
have do-nothing stubs compiled into the
没有合适的资源?快使用搜索试试~ 我知道了~
桂电代码范例F4_Project.rar_ZBCU_imagewgx_keil_pier65
共1154个文件
c:634个
h:386个
s:40个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 58 浏览量
2022-09-23
04:26:12
上传
评论
收藏 5.29MB RAR 举报
温馨提示
代码的规范与例程,主要是提高大家的代码规范与能力
资源推荐
资源详情
资源评论
收起资源包目录
桂电代码范例F4_Project.rar_ZBCU_imagewgx_keil_pier65 (1154个子文件)
arm_cortexM4lf_math.a 616KB
F4_Project.uvguix.AGKODY 84KB
portASM.asm 6KB
port_asm.asm 6KB
portasm.asm 5KB
portext.asm 4KB
portasm.asm 4KB
cstart_thumb2.asm 4KB
portext.asm 3KB
Install.bat 7KB
arm_cortexMx_math_Build.bat 734B
keilkilll.bat 399B
cc936.c 707KB
cc949.c 554KB
cc950.c 440KB
cc932.c 244KB
arm_dct4_init_f32.c 201KB
tasks.c 162KB
ff.c 153KB
stm32f4xx_tim.c 122KB
arm_dct4_init_q31.c 105KB
arm_rfft_init_f32.c 103KB
stm32f4xx_rtc.c 100KB
stm32f4xx_rcc.c 97KB
queue.c 92KB
arm_dct4_init_q15.c 71KB
stm32f4xx_adc.c 67KB
Driver_SDCard.c 62KB
stm32f4xx_flash.c 62KB
usb_core.c 59KB
stm32f4xx_can.c 59KB
stm324x9i_usb_audio_codec.c 58KB
arm_cfft_radix4_q15.c 57KB
stm32f4xx_cryp_aes.c 57KB
stm32f4xx_usart.c 57KB
stm32f4xx_fmc.c 55KB
arm_cfft_radix4_init_f32.c 55KB
stm32f4xx_i2c.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
system_stm32f4xx.c 53KB
stm32f4xx_dma.c 52KB
stm32f4xx_spi.c 51KB
stm324xg_usb_audio_codec.c 47KB
stm32f4xx_sai.c 45KB
mpu_wrappers.c 42KB
stream_buffer.c 42KB
usbh_data.c 41KB
stm32f4xx_fsmc.c 41KB
usbh_usr.c 40KB
timers.c 39KB
stm32f4xx_ltdc.c 39KB
stm32f4xx_sdio.c 38KB
arm_rfft_init_q15.c 38KB
stm32f4xx_pwr.c 37KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
system_stm32f10x.c 36KB
stm32f4xx_cryp.c 35KB
arm_cfft_radix4_f32.c 34KB
usbd_dfu_core.c 31KB
port.c 31KB
arm_cfft_radix4_init_q31.c 30KB
arm_rfft_init_q31.c 30KB
port.c 30KB
port.c 30KB
ccsbcs.c 29KB
system_stm32f10x.c 29KB
system_stm32f10x.c 29KB
system_stm32f10x.c 29KB
port.c 29KB
port.c 29KB
port.c 29KB
port.c 28KB
port.c 28KB
port.c 27KB
arm_cfft_radix4_q31.c 27KB
port.c 27KB
usbh_core.c 27KB
stm32f4xx_dma2d.c 27KB
stm32f4xx_dac.c 26KB
stm32f4xx_hash.c 26KB
port.c 26KB
usbd_cdc_core.c 26KB
dual_func_demo.c 25KB
共 1154 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
局外狗
- 粉丝: 64
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 飞机大战游戏 c++ 代码
- 兲噜啦 - 华人首选的免费、绿色、无毒视频库 在线学习与健康教育_16975711920991627.m3u8..m3u
- vb毕业生管理系统设计(论文+源代码).zip
- 学生课程实验之实现人脸识别人工智能项目.zip
- 在线问卷vue 主要功能包括:问卷发布,数据查看 其中数据查看以图表的方式展现,便于使用者查看调查结果
- javaWeb物资管理系统项目源码.zip
- 基于php+mysql的学生成绩查询系统(含源码).zip
- 学生课程实验之爬取B站up视频中回复的信息的爬虫项目.zip
- 基于matlab实现的NMF程序,非负矩阵分解 用于人脸图像的表示.rar
- 相机源识别的数据集(2018kaggle竞赛数据集)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功