ch32vxxx 烧写

打印 上一主题 下一主题

主题 1316|帖子 1316|积分 3948

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
ch32v003 烧写需 wch-link e [***e];link无法烧写 需link e



使用三线烧写,不需要swclk引脚 

使用串口发送数据;天问的开发板有bootloader可以直接烧写,但如果使用wch-linke覆盖了bootloader后,使用下面的


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);

  1. /*
  2.   Blink
  3.   Turns an LED on for one second, then off for one second, repeatedly.
  4.   Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  5.   it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  6.   the correct LED pin independent of which board is used.
  7.   If you want to know what pin the on-board LED is connected to on your Arduino
  8.   model, check the Technical Specs of your board at:
  9.   https://www.arduino.cc/en/Main/Products
  10.   modified 8 May 2014
  11.   by Scott Fitzgerald
  12.   modified 2 Sep 2016
  13.   by Arturo Guadalupi
  14.   modified 8 Sep 2016
  15.   by Colby Newman
  16.   This example code is in the public domain.
  17.   https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
  18. */
  19. //#define SYSCLK_FREQ_48MHZ_HSI   48000000
  20. // the setup function runs once when you press reset or power the board
  21. #include "CH32V_WS2812.h"
  22. WS2812 led(PD3);
  23. void setup() {
  24.   // initialize digital pin LED_BUILTIN as an output.
  25.    led.pixel_init(6);
  26.    led.setBrightness(50);
  27.    //led.pixel_set_all_color(10,0,10);
  28.    //led.pixel_show();
  29.   //  delay(500);
  30.   // pinMode(PD4 ,OUTPUT);
  31.   //led.rainbowCycle(100);
  32. }
  33. // the loop function runs over and over again forever
  34. void loop() {
  35.                     // wait for a second
  36.   //led.pixel_set_all_color(0,50,0);
  37.   //led.pixel_show();
  38.   led.rainbowCycle(10);
  39.   //delay(10);
  40.   
  41. }
复制代码

默认主频 24MHZ 与设置 
system_ch32v00x.c

GPIO_SPEED_MODE 已经被设置为50MHZ 地点文件为wring_digital.c pinmode


串口IAP使用

CH32V003 串口IAP例程使用疑问 - 沁恒微电子社区
问题 
WCHMCUIAP _ERASE READ STATUS FAILURE [0>2B]
下载完IAP后,拔了重插,可以下载 
PC0接VCC 
软件的版本 低版本不支持0X1FFFF000设置 
官方的与国外的教程 CH32V003: How To Flash Program Using Serial Port »
官方的教程还没国外的写的详细 
ARDUINO 下 中断存在问题 使用mountriver 或天问
WCHLINKE TX RX 

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

星球的眼睛

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表