0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

RZ/T2M RZ/N2L RZ/T2L系列应用心得(下)

瑞萨MCU小百科 来源:瑞萨MCU小百科 2023-12-29 12:24 次阅读

CN032套件中的新功率板的连接方式说明

老版本功率板:

be411456-a5ff-11ee-8b88-92fbcf53809c.png

新版本功率板:

be564d80-a5ff-11ee-8b88-92fbcf53809c.png

差别

新的版本从PE保护地起,中间是2个接线柱,老版本是3个,注意千万不要按照老的接线方式,会炸管子。

另外,请注意

1220V限制1A

2逆变板供电时候不要接DC电源到主控制板

3下电后放电彻底后再操作

be8dcbde-a5ff-11ee-8b88-92fbcf53809c.png

IAR新工程的创建示例

请参考百度网盘与客户的培训视频

十一如何开启中断嵌套

在中断函数进入后插入

__asm volatile ("cpsie i");//打开全局中断

__asm volatile ("isb");//同步指令

出中断处插入关闭中断

__asm volatile ("cpsid i");//

__asm volatile ("isb");//同步指令

bea0ad12-a5ff-11ee-8b88-92fbcf53809c.png

示例

beb818da-a5ff-11ee-8b88-92fbcf53809c.pngbed4f5c2-a5ff-11ee-8b88-92fbcf53809c.png

十二EVK xSPI0 IAR编译及烧写程序说明

1CN8接2-3,接通QSPI的电源

2Smart configurator选择xspi0启动

3Debugger可以选择I-jet或者J-Link

4I-jet需配置如下

bedf75ba-a5ff-11ee-8b88-92fbcf53809c.png

5断点设置如下

bef96e2a-a5ff-11ee-8b88-92fbcf53809c.png

如使用J-Link也使用硬件断点

如出现类似如下错误报警:xspi0地址区域验证错误

bf1506d0-a5ff-11ee-8b88-92fbcf53809c.png

需使用J-Link commander擦除qspi flash

bf21645c-a5ff-11ee-8b88-92fbcf53809c.pngbf30e6e8-a5ff-11ee-8b88-92fbcf53809c.png

十三USB PCDC例程如何判断上位机串口调试助手连接成功

如下部分代码加在

case USB_STATUS_REQUEST: /* Receive Class Request */

bf3bdff8-a5ff-11ee-8b88-92fbcf53809c.png

==3代表上位机串口软件打开,可以进行数据收发。

十四关于N2L 225pin封装

1可以直接使用CN032的主板封装(autium designer格式)

bf42c08e-a5ff-11ee-8b88-92fbcf53809c.png

2参考datasheet时候,其视图为底视图,即球面对人

bf685dda-a5ff-11ee-8b88-92fbcf53809c.png

十五RSK版EEPROM TWinCAT更新不进去解决方法

把eeprom size改成与RSK板子对照

bf7b6d08-a5ff-11ee-8b88-92fbcf53809c.png

十六外部晶振推荐使用有源晶振

bf8f3f36-a5ff-11ee-8b88-92fbcf53809c.png

十七

P17_5 使用注意

初始状态是RSTOUT配置,不要用做Digital output.

十八SDRAM使用注意

使用CS2. CS3不能单独使用

十九EIP例程测试

需要下载CODESYS version 3.5.15.10 32-bit,因为例程和这个版本适配,其他版本不行。

CODESYS Development System V3

bfb4bf5e-a5ff-11ee-8b88-92fbcf53809c.png

下载前需要先注册codesys会员,免费。

二十T2M N2L电流环运行时间测试

可以在CN032套件上测试,在电流环运行前后增加GPIO翻转,然后去除掉反转时间就是电流环运行时间:

下图上面是T2M下面是N2L,基于瑞萨的电流环算法

bfc02df8-a5ff-11ee-8b88-92fbcf53809c.pngbfdd2cd2-a5ff-11ee-8b88-92fbcf53809c.png

从图上看,T2M电流环大约1us N2L 1.35us.

二十一Freertos使用指导

使用freertos和多个不同优先级中断时候,需要修改如下内容:

1Target File: port.c

左右滑动查看完整内容

void vApplicationIRQHandler (uint32_t ulICCIAR) 
{ 
 #if 0 
  /* Re-enable interrupts. */
  __asm("cpsie i"); 
 #endif 
 bsp_common_interrupt_handler(ulICCIAR); 
}

2Target File: bsp_irq.c

左右滑动查看完整内容

void bsp_common_interrupt_handler (uint32_t id) 
{ 
 uint16_t gic_intid; 
 /* Get interruot ID (GIC INTID). */ 
 gic_intid = (uint16_t) (id & BSP_PRV_ID_MASK); 
#if VECTOR_DATA_IRQ_COUNT > 0 
 if (BSP_CORTEX_VECTOR_TABLE_ENTRIES <= gic_intid) 
  { 
    /* Remain the interrupt number */ 
    g_current_interrupt_num[g_current_interrupt_pointer++] = 
    (uint16_t) (gic_intid - BSP_CORTEX_VECTOR_TABLE_ENTRIES); 
    __asm volatile ("dmb"); 
    #if 1 
      /* Enable nested interrupt. */ 
      __asm volatile ("cpsie i"); 
      __asm volatile ("isb"); 
      #endif 
      /* Branch to an interrupt handler. */ 
      g_vector_table[(gic_intid - BSP_CORTEX_VECTOR_TABLE_ENTRIES)](); 
      } 
      else 
    #endif 
{ 
/* Remain the interrupt number */ 
g_current_interrupt_num[g_current_interrupt_pointer++] = gic_intid; 
__asm volatile ("dmb"); 
#if 1 
/* Enable nested interrupt. */ 
__asm volatile ("cpsie i"); 
__asm volatile ("isb"); 
#endif 
/* Branch to an interrupt handler. */ 
g_sgi_ppi_vector_table[gic_intid](); 
} 
#if 1 
/* Disable nested interrupt. */ 
__asm volatile ("cpsid i"); 
__asm volatile ("isb"); 
#endif 
g_current_interrupt_pointer--; 
}

二十二FSP更改设置后编译报错

bsp_mcu_device_pn_cfg.h :No such file or direction

问题一般发生在

Changed from RSK+RZN2L (RAM execution without flash memory) to RZN2L Custom User Board (xSPI0 x1 boot mode)

bsp_mcu_device_pn_cfg.h 没有自动生成,所以报错:

bfeb104a-a5ff-11ee-8b88-92fbcf53809c.png

Workaround:

Please create a new project to change the board setting to RZN2L Custom User Board.

二十三MTU3定时器中断进不去中断问题(FSP V1.2以下版本,1.2和以上无问题)

1增加三相电机驱动

bffd5908-a5ff-11ee-8b88-92fbcf53809c.png

2配置定时器中断(定时器比较匹配中断,一般在这个中断里更新pwm duty cycle)

c010e9be-a5ff-11ee-8b88-92fbcf53809c.png

此时不用管报错:

c01b4378-a5ff-11ee-8b88-92fbcf53809c.png

直接点生成代码

c029779a-a5ff-11ee-8b88-92fbcf53809c.png

3修改如下生成的文件

c03d8c9e-a5ff-11ee-8b88-92fbcf53809c.png

4增加中断回调函数

c04da4c6-a5ff-11ee-8b88-92fbcf53809c.png

5举一反三,如果其他定时器中断进不去,也可以查查是不是hal_data.c里面生成的代码中断向量号这里宏定义出错了。

二十四串口引脚使用注意

串口引脚最好定义在P16 P18这两组引脚上,因为这两组支持ELC,可以方便的去做不定长数据的接收。

审核编辑:汤梓红

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • 主板
    +关注

    关注

    52

    文章

    1628

    浏览量

    68134
  • 瑞萨
    +关注

    关注

    32

    文章

    22214

    浏览量

    84915
  • 中断
    +关注

    关注

    5

    文章

    884

    浏览量

    41023
  • DC电源
    +关注

    关注

    0

    文章

    217

    浏览量

    15664

原文标题:RZ/T2M RZ/N2L RZ/T2L系列应用心得(6-下)

文章出处:【微信号:瑞萨MCU小百科,微信公众号:瑞萨MCU小百科】欢迎添加关注!文章转载请注明出处。

收藏 人收藏

    评论

    相关推荐

    RZ/T2M RZ/N2L RZ/T2L系列用心得

    RZ/T2MRZ/N2L共用各种软件协议栈支持情况。
    的头像 发表于 11-15 16:09 882次阅读
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>T2L</b><b class='flag-5'>系列</b>应<b class='flag-5'>用心得</b>

    RZ/T2M RZ/N2L RZ/T2L系列用心得(上)

    T2M R9A07G075M28GBG#AC0为例,在官网找到RZ/T2M产品页,然后向下找到Product option界面。
    的头像 发表于 12-29 12:23 903次阅读
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>T2L</b><b class='flag-5'>系列</b>应<b class='flag-5'>用心得</b>(上)

    RZ/T2M电机控制MPU怎么样?有哪些特征应用?

    新推出的的RZ/T2M电机控制微处理器单元,该单元在单芯片上结合了快速、高精度的实时电机控制功能和工业以太网,同时还支持功能安全操作。通过提供电机控制的所有基本外设功能,RZ/T2MM
    发表于 03-01 14:42

    RZ/T2MRZ/N2L 组硬件设计指南

    RZ/T2MRZ/N2L 组硬件设计指南
    发表于 01-09 18:57 1次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> 组硬件设计指南

    RZ/T2MRZ/T2M Motor Solution Kit Startup 手册(for RZ/T2M Motion Control Utility)

    RZ/T2MRZ/T2M Motor Solution Kit Startup 手册(for RZ/
    发表于 01-10 19:00 0次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> 组 <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motor Solution Kit Startup 手册(for <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motion Control Utility)

    RZ/T2MRZ/T2M Motor Solution Board 硬件手册

    RZ/T2MRZ/T2M Motor Solution Board 硬件手册
    发表于 01-10 19:00 0次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> 组 <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motor Solution Board 硬件手册

    CN032交流伺服解决方案硬件手册(适用于RZ/T2MRZ/N2L

    CN032 交流伺服解决方案硬件手册(适用于RZ/T2MRZ/N2L
    发表于 05-12 19:19 0次下载
    CN032交流伺服解决方案硬件手册(适用于<b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b>)

    CN032交流伺服解决方案硬件手册(适用于RZ/T2MRZ/N2L

    CN032 交流伺服解决方案硬件手册(适用于RZ/T2MRZ/N2L
    发表于 06-29 19:11 0次下载
    CN032交流伺服解决方案硬件手册(适用于<b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b>)

    RZ/T2MRZ/N2L 组硬件设计指南

    RZ/T2MRZ/N2L 组硬件设计指南
    发表于 06-30 18:33 2次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> 组硬件设计指南

    RZ/N2L 组数据表

    RZ/N2L 组数据表
    发表于 06-30 19:20 0次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> 组数据表

    RZ/T2MRZ/T2M Motor Solution Kit Startup 手册(for RZ/T2M Motion Control Utility)

    RZ/T2MRZ/T2M Motor Solution Kit Startup 手册(for RZ/
    发表于 06-30 19:41 0次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> 组 <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motor Solution Kit Startup 手册(for <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motion Control Utility)

    RZ/T2MRZ/T2M Motor Solution Board 硬件手册

    RZ/T2MRZ/T2M Motor Solution Board 硬件手册
    发表于 06-30 19:41 1次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> 组 <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> Motor Solution Board 硬件手册

    RZ/T2MRZ/N2LRZ/T2L产品简介

    瑞萨电子在2022年6月推出了第二代高性能、多功能的RZ/T2M电机控制微处理器MPU,应用于交流伺服驱动器和工业机器人等领域。RZ/T2M可实现交流伺服系统和工业电机等工业设备的高速
    的头像 发表于 11-13 15:50 1138次阅读
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b>和<b class='flag-5'>RZ</b>/<b class='flag-5'>T2L</b>产品简介

    RZ/T2M RZ/N2L RZ/T2L系列用心得

    已经测试,CiA402,ecat_IO都可以编译并正常运行。
    的头像 发表于 12-22 13:44 387次阅读
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b> <b class='flag-5'>RZ</b>/<b class='flag-5'>T2L</b><b class='flag-5'>系列</b>应<b class='flag-5'>用心得</b>

    RZ/T2MRZ/N2LRZ/T2L组 硬件设计指南

    电子发烧友网站提供《RZ/T2MRZ/N2LRZ/T2L组 硬件设计指南.pdf》资料免费下
    发表于 02-02 09:39 1次下载
    <b class='flag-5'>RZ</b>/<b class='flag-5'>T2M</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>N2L</b>、<b class='flag-5'>RZ</b>/<b class='flag-5'>T2L</b>组 硬件设计指南