對(duì)CH32F103的USB功能的一些問題

有個(gè)老外用戶對(duì)CH32F103用usb功能的一些問題, 想請(qǐng)教一下

  1. ?COREID, 這個(gè)我應(yīng)該能自己找

  2. USB的D-, D+, 連到PA11和PA12時(shí), 沁恒的例子應(yīng)該不串22R電阻也不加1.5K上拉, 但是大部分bluepill是帶的, 這額外的電阻和上拉會(huì)對(duì)usb有影響么?

  3. CH32F103的USB初始化, 和STM32F103的USB初始化是不是一樣的? 需要額外的初始化操作么

  4. 有沒有CH32F103的USB CDC的完整例子?

原文

  1. First, what is the Coreid that the CH32F103 presents when debugging? The STM32F1 is 0x1BA01477, for example.

  2. Does the datasheet say that 22 ohm resistors should be in series with the PA11/PA12 USB -/+ pins and that PA12 should be pulled up with a 1k5? The schematic on the evaluation board does not include these. Most Bluepills do include these, and I am wondering if that's part of the problem.

  3. Is the USB device on the CH32F103 intended to be register and memory compatible with STM32F103 ? The registers have the same names and bits, but there could be additional initialization required for the CH32F103 that is not required on the STM32F103.

  4. Are there any complete code examples of USB for the CH32F103, for example, a USB CDC implementation that you know of?

Thank you!


您好,關(guān)于CH32F103的USB,在芯片內(nèi)部?jī)?nèi)置上來電阻,可通過程序配置開啟,無需外接上拉電阻,如下圖1、2。關(guān)于USB初始化,在初始化的時(shí)候要對(duì)狀態(tài)寄存器全清,具體程序配置見下圖3。在CH32F103 EVT中有CDC例程,可以參考下。CH32F103 EVT下載鏈接如下:

http://m.findthetime.net/downloads/CH32F103EVT_ZIP.html?

image.png

圖1

image.png

圖2

image.png

圖3


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频