ch32vxxx 烧写
ch32v003 烧写需 wch-link e [***e];link无法烧写 需link ehttps://i-blog.csdnimg.cn/direct/0e88a417ef0a4344ad22c71abbf82930.png
https://i-blog.csdnimg.cn/blog_migrate/be90e40ec0567000f637121db1dbbd19.png
使用三线烧写,不需要swclk引脚
https://i-blog.csdnimg.cn/blog_migrate/e2806d62754edcb97d9fcba5edb67656.png
使用串口发送数据;天问的开发板有bootloader可以直接烧写,但如果使用wch-linke覆盖了bootloader后,使用下面的
https://i-blog.csdnimg.cn/blog_migrate/ea8672de59238d4e95b146834eb65650.png
ch32v103 ch32v link可烧写
wchlink模式;tx gnd 毗连 切换状态;risv arm
risv 针对 ch32v ; arm ch32f
经常需更新固件 ispunitl
-----------------------------------------------------------------
arduino 库 下载地址 使用
GitHub - openwch/arduino_core_ch32: Core library for CH32duino
1.0.3
ch32v003 WS2812B 可以使用TWCH32V003的WS2812库;需要调整主频为48M,GPIO_SPPED不调 ;arduino ch32v003 1.0.3 注意引脚
使用逻辑分析仪 抓取波形 ARDUINO NANO 与CH32V
PD_4 PD4 代表的引脚不同;PD4
// pinMode(PD4 ,OUTPUT);
//led.rainbowCycle(100);
直接使用寄存器操作 PD4操作
//((GPIO_TypeDef *)(GPIOD_BASE ))->BSHR = 1<<(4);
//delay(500);
//((GPIO_TypeDef *)(GPIOD_BASE ))->BCR = 1<<(4);
//delay(500);
https://i-blog.csdnimg.cn/direct/9ef86134809948d5ac75a82c6e600235.png
/*
Blink
Turns an LED on for one second, then off for one second, repeatedly.
Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
the correct LED pin independent of which board is used.
If you want to know what pin the on-board LED is connected to on your Arduino
model, check the Technical Specs of your board at:
https://www.arduino.cc/en/Main/Products
modified 8 May 2014
by Scott Fitzgerald
modified 2 Sep 2016
by Arturo Guadalupi
modified 8 Sep 2016
by Colby Newman
This example code is in the public domain.
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
//#define SYSCLK_FREQ_48MHZ_HSI 48000000
// the setup function runs once when you press reset or power the board
#include "CH32V_WS2812.h"
WS2812 led(PD3);
void setup() {
// initialize digital pin LED_BUILTIN as an output.
led.pixel_init(6);
led.setBrightness(50);
//led.pixel_set_all_color(10,0,10);
//led.pixel_show();
//delay(500);
// pinMode(PD4 ,OUTPUT);
//led.rainbowCycle(100);
}
// the loop function runs over and over again forever
void loop() {
// wait for a second
//led.pixel_set_all_color(0,50,0);
//led.pixel_show();
led.rainbowCycle(10);
//delay(10);
}
默认主频 24MHZ 与设置
system_ch32v00x.c
https://i-blog.csdnimg.cn/direct/1f84a9c22fb74e4c8345d6608fa3d566.png
GPIO_SPEED_MODE 已经被设置为50MHZ 地点文件为wring_digital.c pinmode
https://i-blog.csdnimg.cn/direct/9633bd9aef0847a09cd159fb4bc2ba64.png
串口IAP使用
CH32V003 串口IAP例程使用疑问 - 沁恒微电子社区
问题
WCHMCUIAP _ERASE READ STATUS FAILURE
下载完IAP后,拔了重插,可以下载
PC0接VCC
软件的版本 低版本不支持0X1FFFF000设置
官方的与国外的教程 CH32V003: How To Flash Program Using Serial Port »
官方的教程还没国外的写的详细
ARDUINO 下 中断存在问题 使用mountriver 或天问
WCHLINKE TX RX
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]