一、概述/目的
-
随着光伏、储能、电车、电力输送、机器人等应用普及,数字电源与伺服凸显重要性
-
简介RA6T2资料,数字电源与伺服需要mcu哪些特性
-
通过瑞萨RA6T2和STM32G4x4对比深刻理解mcu性能需求
-
通过RA6T2和STM32G4x4coremark深刻理解mcu性能影响
-
野火RA6T2目前只有几个例程,不利于初学者深入理解
-
注意
:数字电源与伺服包含了软硬件,并且是非常专业和深度的领域。本文只讨论数字电源与伺服的主控mcu特性需求,个人理解也比较有限,仅供交流讨论。
二、资料来源
-
stm32g4x4:https://www.st.com.cn/zh/microcontrollers-microprocessors/stm32g4x4.html
-
带图腾柱交错式 PFC 的数字电源
-
双向数字电源系统
-
CN028-BIDIRDPSEVZ双向数字电源评估套件
-
南京芯干线 RA6T2 三相5KW ACDC无桥PFC数字电源
-
机器人四肢的伺服电机控制
-
微型 BLDC 伺服器
-
ETHERCAT交流伺服
-
数字电源指南
-
三相磁场定向控制 (FOC)
-
STDES-3KWTLCP 3 kW电信整流器参考设计,基于STM32G474RBT6数字电源MCU
-
STEVAL-DPSG474 数字电源控制套件,基于STM32G474RE
-
STEVAL-IPFC01V1 基于STNRGPF01数字控制器的3 kW三通道交错式PFC
-
工业电机控制
瑞萨RA系列通用的功能可参加:
-
野火\]瑞萨RA系列FSP库开发实战指南
-
从0开始卷出一个新项目之瑞萨RA6M5 Gitee仓库
野火RA6T2开发板:
-
野火-瑞萨 启明电机系列开发板
-
野火-瑞萨 启明电机 Gitee仓库
三、数字电源与伺服需要mcu哪些特性
-
高性能
µs 级别时间范围内执行的电流控制环路计算,需要高主频、高速内存/cache
-
高精度PWM产生和关断
ns级甚至ps级的PWM发波要求,同时要有关断功能,比如过流或者过压直接关死等
-
快速ADC采样
ADC采样完成的越快越好,ADC精度12-16位;比较器;DAC;放大器
-
算法高效执行
浮点FPU、三角函数加速TFU、ARM DPS库、其硬件加速IIR滤波/ART/以及数学运算加速器
-
丰富接口
CANFD、USB、ethercat等;大容量flash/ram
-
解决方案
软硬件解决方面,便与评估,加速开发


四、RA6T2 vs STM32G474 详细对比
| 特性 | 瑞萨 RA6T2 | STM32G474 |
|---|---|---|
| 内核 | CM33 240MHz cache | CM4 170MHz cache |
| ADC | 6.25 Msps 140ns 16-bit 156ps DAC12 s/h×6 (PGA) × 4 | 4M samples/s 0.19μs 12/16位 184ps DAC12 15M samples/s 比较器(17ns) 6 PGA |
| HRPWM | 32-bit (GPT32) with High Resolution × 4 156 ps | 6 x16-bit counters 184 ps resolution |
| 硬件加速器 | FPU DSP指令 三角函数单元(TFU) 二阶滤波器(IIR) | FPU DSP指令 CORDIC ART Accelerator |
| 模拟集成 | PGA, 比较器, 12位DAC | 运算放大器, 比较器, 12位DAC |
| CoreMark | 962 | 580 |
| 工作电压 | 2.7V to 3.6V | 1.71V to 3.6V |
| Flash RAM | 512KB/64KB | 512KB/128KB |
| 通信接口 | CAN-FD, USB, SPI, I2C, UART | CAN-FD, USB, SPI, I2C, UART,IIS,SAI |
| 硬件保护 | POEG、ECC、SCE5、ELC | RNG、CRC、CCM |
| 工作温度 | -40°C to 105°C | -40°C to 125°C |
| 封装选项 | LQFP-100, LQFP-64 | LQFP-64, LQFP-48, QFN-32 |
| 开发环境 | 灵活配置软件包(FSP), Motor WorkBench GUI | STM32Cube生态系统, 数字电源固件库 |
| Roadmap | RZT2H RZT2M RA8T2 RA6T2 RA4T1 RA2T1 | STM32H7 STM32H5 STM32G4 STM32G0 STM32F3 STM32F1 |
五、RA6T2 coremark
-
RA6T2EEMBC Benchmark Score Viewer:https://www.eembc.org/viewer/?benchmark_seq=13480
-
STM32G4的内核性能:https://shequ.stmicroelectronics.cn/thread-632287-1-1.html
| 特性 | 测试条件 | coremark |
|---|---|---|
| STM32G474 | Flash运行关闭ART | 169.6 |
| Flash运行打开ART | 547.1 | |
| SRAM运行关闭ART | 420.5 | |
| CCM SRAM运行 | 580 | |
| 特性 | 测试条件 | coremark |
| RA6T2 | gcc未开启cache | 492 |
| iar未开启cache | 492 | |
| iar未开启cache | 674 | |
| iar开启cache | 976 |
-
gcc未开启cache:
Toolchain ver:13.2.1 20231009
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 12188
Total time (secs): 12.188000
Iterations/Sec : 492.287496
Iterations : 6000
Compiler version : GCC13.2.1 20231009
Compiler flags : Please put compiler flags here (e.g. -ofast)
Memory location : STACK
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0xa14c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 492.287496 / GCC13.2.1 20231009 Please put compiler flags here (e.g. -ofast) / STACK
terminated coremain!
running! -
iar未开启cache:
Toolchain ver:IAR ANSI C/C++ Compiler V9.50.1.380/W64 for ARM
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 11868
Total time (secs): 11.868000
Iterations/Sec : 674.081564
Iterations : 8000
Compiler version : Please put compiler version here (e.g. gcc 4.1)
Compiler flags : Please put compiler flags here (e.g. -ofast)
Memory location : STACK
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0x5275
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 674.081564 / Please put compiler version here (e.g. gcc 4.1) Please put compiler flags here (e.g. -ofast) / STACK
terminated coremain!
running! -
iar开启cache:
Toolchain ver:IAR ANSI C/C++ Compiler V9.50.1.380/W64 for ARM
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 10245
Total time (secs): 10.245000
Iterations/Sec : 976.085896
Iterations : 10000
Compiler version : Please put compiler version here (e.g. gcc 4.1)
Compiler flags : Please put compiler flags here (e.g. -ofast)
Memory location : STACK
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0x988c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 976.085896 / Please put compiler version here (e.g. gcc 4.1) Please put compiler flags here (e.g. -ofast) / STACK
terminated coremain!
running!
六、总结
-
CM33、Cache、高主频、FPU、TFU、DSP、IIR、ELC、ECC、HRPWM、12-16ADC、PGA、DAC等资源/特性,共同决定了RA6T2适用于中端电机和数字电源使用
-
本文通过RA6T2 vs STM32G474资源对比、coremark分析,尝试深入理解。
