串口+IO
前言: 非常感谢电子发烧友和瑞萨生态工作室能够给这次试用开发板的机会,后续根据生RA态工作室提供的资料进行功能测试。此篇根据RA Smart Configurator安装文档,搭建Keil的开发环境,不对之处还请各位大佬指正。串口和IO的操作借鉴了试用者的代码,跟着大家一起学习。下载的demo项目中也有许多可以测试验证的。
一、资料下载
到网址https://ramcu.cn/lists/21.html页面下载,点击RA Smart Configurator,进入到百度网盘进行下载,如图所示。

安装包及说明文档下载,如图所示。


二、项目工程Demo下载
去到https://github.com/renesas/ra-fsp-examples下载例程。
最后下载的文件如图所示。

三、RA Smart Configurator安装
RA Smart Configurator是瑞萨的智能配置软件,在配置完成后,可以生成keil工程,方便使用keil的用户进行开发。
点击setup_fsp_v4_0_0_rasc_v2022-07.exe,根据RA Smart Configurator安装说明文档中安装图片所示。





四、KEIL下RENESAS RA PACK 包安装
安装PACK需要高一些的版本KEIL,我的是5.28,双击有问题,然后下载了个5.34版本,安装后,双击安装包,即可找到KEIL的安装目录了,安装完成后如图所示。

五、keil项目生成
1、打开FSP Smart Configurator,新建一个项目,如图所示。

2、选择处理器,如图所示。

3、修改IDE Project Type为keil,如图所示。

4、不需要加密功能,如图所示。

5、不需要操作系统,如图所示。

6、选择个Project Template,如图所示。

7、配置完成,如图所示。

8、串口配置,如图所示,点击Stacks->new Stack->Connectivity->Uart(r_sci_uart)。

9、因DEBUG0默认需要修改,如图所示,修改为SWD。

10、点击Pin->Peripherals->Connectivity:SCI->SCI9,选择串口,如图所示。

11、如图所示,设置好串口相关功能。

12、点击Generate Project Content,生成KEIL项目,如图所示。

六、配置编译Keil项目
1、到目录保存位置目录C:\Users\hetin\RASmartConfigurator\workspace\FSP_Project_Uart,如图所示,打开keil project。

2、打开keil工程,设置Device,如图所示。


3、点击Debug,选择自己的调试工具,我用的Jlink,点击Setting,如图所示。

4、点击Flash,点击Add,选择如图所示项。

5、设置完成后,点击编译,成功后进行下载。

七、测试方法
打开串口输入1~6,试试看看什么现象,如视频所示。
|