HKPS 首塊RISC-V開發板規格

Back
Category : Home

MCU : CH32V203

CH32V203系列是基於32位元RISC-V核心設計的工業級增強型通用微控制器,高效能,最高支援144MHz系統主頻,運作功耗低至49.3uA/MHz。機等豐富的周邊資源,同時提供TSSOP20、QFN28、QFN48X7、LQFP32、LQFP48等多種封裝供客戶彈性選擇。

系統模組

  • 青稞V4B,最高144MHz系統主頻
  • 支援單週期乘法和硬體除法
  • 20KB靜態RAM,64KB快閃記憶體
  • 供電電壓:2.5/3.3V,GPIO單元獨立供電
  • 摘要模式:睡眠、停止、待機
  • 運轉模式低至49.3uA/MHz
  • 睡眠模式低至19.4uA/MHz
  • 上/下電重設、可程式電壓監測器
  • 1組8路通用DMA控制器
  • 2組試驗器
  • 10頻道12位元ADC轉換,10路觸控按鍵TouchKey
  • 4 小組
  • 1個USB2.0全速主機/設備接口
  • 1個USB2.0全速設備接口
  • 4個串口
  • 1個CAN介面(2.0B主動)
  • 2組IIC介面、2組SPI接口
  • 37個I/O口,可以贏得16外部中斷
  • CRC運算單元,96位元晶片唯一ID
  • 串行2線調試接口
  • 封裝形式:TSSOP20、QFN28、QFN48X7、LQFP32、LQFP48

開發資料

1、資料手冊:CH32V203DS0.PDFCH32FV2x_V3xRM.PDF
2、CH32V203評估板說明及參考應用範例:CH32V20xEVT.ZIP
3、整合開發環境(IDE):MounRiver Studio(MRS)

相關資料

https://www.wch.cn/products/CH32V203.html

實驗代碼

/********************************** (C) COPYRIGHT *******************************
 * File Name          : main.c
 * Author             : WCH
 * Version            : V1.0.0
 * Date               : 2021/06/06
 * Description        : Main program body.
 *********************************************************************************
 * Copyright (c) 2021 Nanjing Qinheng Microelectronics Co., Ltd.
 * Attention: This software (modified or not) and binary are used for 
 * microcontroller manufactured by Nanjing Qinheng Microelectronics.
 *******************************************************************************/

/*
 *@Note
 *USART Print debugging routine:
 *USART1_Tx(PA9).
 *This example demonstrates using USART1(PA9) as a print debug port output.
 *
 */

#include "debug.h"

/* Global typedef */

/* Global define */

/* Global Variable */

//=========== External function ====================
//==================================================

void GPIO_Toggle_INIT(void)
{
    GPIO_InitTypeDef GPIO_InitStructure = {0};

    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
    GPIO_Init(GPIOB, &GPIO_InitStructure);
}

/*********************************************************************
 * @fn      main
 *
 * @brief   Main program.
 *
 * @return  none
 */
int main(void)
{
    NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);
    SystemCoreClockUpdate();
    Delay_Init();
    USART_Printf_Init(115200);
    printf("SystemClk:%d\r\n", SystemCoreClock);
    printf( "ChipID:%08x\r\n", DBGMCU_GetCHIPID() );
    printf("This is printf example\r\n");

    GPIO_Toggle_INIT();


    while(1)
    {
        GPIO_WriteBit(GPIOB, GPIO_Pin_9, Bit_RESET);
        Delay_Ms(250);
        GPIO_WriteBit(GPIOB, GPIO_Pin_9, Bit_SET);
        Delay_Ms(250);
    }
}