找回密码
 立即注册

QQ登录

只需一步,快速开始

开启左侧

M452/453 USB 虚拟串口代码

  [复制链接]
Angus 发表于 2015-8-19 10:34:04 | 显示全部楼层 |阅读模式
  代码烧录到芯片M452/453 后,USB 连 PC 机,会有一个 M453_VCOM 设备,更新设备驱动——在软件包内——会多出一个串口。
打开一个串口助手,会不停的收到数据。在串口助手中也可以发送给 M452/453

详细代码: M451SeriesBSP_CMSIS_v3.00.005_VCOM.zip (3.84 MB, 下载次数: 1550)
回复

使用道具 举报

hemingxian 发表于 2015-9-7 21:16:17 | 显示全部楼层
这个包我无法通过编译
Rebuild target 'USBD_VCOM'
assembling startup_M451Series.s...
creating preprocessor file for IP_Initial_Fun.c...
compiling IP_Initial_Fun.c...
..\Library\StdDriver\inc\sys.h(916): error:  #77-D: this declaration has no storage class or type specifier
..\Library\StdDriver\inc\sys.h(916): error:  #65: expected a ";"
..\Library\StdDriver\inc\sys.h(940): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(357): error:  #757: variable "__STATIC_INLINE" is not a type name
..\Library\StdDriver\inc\clk.h(357): error:  #101: "uint32_t" has already been declared in the current scope
..\Library\StdDriver\inc\clk.h(357): error:  #65: expected a ";"
..\Library\StdDriver\inc\clk.h(379): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(382): error:  #77-D: this declaration has no storage class or type specifier
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32FIN" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NF" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NR" is undefined
..\Library\StdDriver\inc\clk.h(382): error:  #20: identifier "u32NO" is undefined
..\Library\StdDriver\inc\clk.h(384): error:  #169: expected a declaration
..\Library\StdDriver\inc\clk.h(385): error:  #169: expected a declaration
..\Library\StdDriver\inc\clk.h(407): warning:  #12-D: parsing restarts here after previous syntax error
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(408): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(411): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(412): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(413): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(414): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(415): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(416): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(417): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(417): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(418): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(418): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(419): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(420): error:  #757: variable "uint32_t" is not a type name
..\Library\StdDriver\inc\clk.h(421): error:  #757: variable "uint32_t" is not a type name
............
Target not created
但还是感谢楼主的奉献。
我的MDK是V4.23,编译M451SeriesBSP_CMSIS_v3.00.005的例程没有问题。
回复 支持 反对

使用道具 举报

 楼主| Angus 发表于 2015-9-11 14:01:52 | 显示全部楼层
hemingxian 发表于 2015-9-7 21:16
这个包我无法通过编译
Rebuild target 'USBD_VCOM'
assembling startup_M451Series.s...

我用的是MDK5.10。出现这些问题,主要是 stdint.h 等几个头文件已在 MDK5 的系统文件夹里,所以这个软件包里就没加上。您可以自己找到拷贝过来就没问题了。
回复 支持 反对

使用道具 举报

hemingxian 发表于 2015-9-11 22:09:06 | 显示全部楼层
不像楼主说的那么简单,我试了试,不行。
回复 支持 反对

使用道具 举报

boltnut 发表于 2015-10-29 20:08:08 | 显示全部楼层
把檔案的路徑調整一下,就 OK 了 !
qq: 1926956046
email: boltnut168@gmail.com
回复 支持 反对

使用道具 举报

hemingxian 发表于 2015-10-30 11:40:21 | 显示全部楼层
能将你调整好路径的包发上来吗?我来测试一下真假
回复 支持 反对

使用道具 举报

luom-cd 发表于 2015-11-5 12:56:38 | 显示全部楼层
用内部HIRC,不能够正常识别VCOM。 请问这是必须要用外部晶振经过PLL输出才能够给USB提供时钟么?没有外部晶振是不可以的么。切盼回复
回复 支持 反对

使用道具 举报

 楼主| Angus 发表于 2015-11-10 08:54:21 | 显示全部楼层
luom-cd 发表于 2015-11-5 12:56
用内部HIRC,不能够正常识别VCOM。 请问这是必须要用外部晶振经过PLL输出才能够给USB提供时钟么?没有外部 ...

USB 需要一个 48MHz 的时钟,内部 HIRC 是 22.1184MHz ,无法倍频得到 48MHz
回复 支持 反对

使用道具 举报

hemingxian 发表于 2016-1-29 20:29:36 | 显示全部楼层
本帖最后由 hemingxian 于 2016-1-29 20:34 编辑

我安装了MDK5.10,并安装了Nuvoton.NuMicro_DFP.1.0.5,可是却出现了这个
楼主能给个支持M451系列的包吗?
aa.jpg
回复 支持 反对

使用道具 举报

 楼主| Angus 发表于 2016-1-29 20:46:51 | 显示全部楼层
hemingxian 发表于 2016-1-29 20:29
我安装了MDK5.10,并安装了Nuvoton.NuMicro_DFP.1.0.5,可是却出现了这个
楼主能给个支持M451系列的包吗? ...

装一下芯唐的 Nu_Link Keil Driver 就可以了,在芯唐网站可以下载。
回复 支持 反对

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies |上传

本版积分规则

新唐MCU