那就没办法了,既然你跟别家代理在合作。。想帮都帮不了你。。


最近有点忙。
以前写过一个R8C/25上面使用内部40MHz晶振,5分频得到8MHz CPU Clock的函数。
您对着手册参考一下吧。R8C时钟设置都差不多。可能都不需要改动。
另外,该跟代理要的软件,还是要来好。可能瑞萨网站上也有下载,搜一下。
/********************************************************************/
/* Function name: InitClock */
/* Description : System Clock Initialization */
/* Input : NULL */
/* Output : NULL */
/********************************************************************/
void InitClock(void)
{
unsigned int i = 0;
asm("FCLR I"); /* Interrupt disable */
prc0 = 1; /* CM0, CM1, OCD, FRA0, FRA1, FRA2 Protect off */
fra22 = 0; /* On-chip oscillator divide by 5 */
fra21 = 1;
fra20 = 1;
fra00 = 1; /* High-speed on-chip oscillator on */
cm16 = 0; /* Main clock = No division mode */
cm17 = 0;
cm06 = 0; /* CM16 and CM17 enable */
while( i <= 254 ) i++; /* Slight Delay */
fra01 = 1; /* Select high-speed on-chip oscillator */
prc0 = 0; /* CM0, CM1, OCD, FRA0, FRA1, FRA2 Protect off */
asm("FSET I"); /* Interrupt enable */
}
以前写过一个R8C/25上面使用内部40MHz晶振,5分频得到8MHz CPU Clock的函数。
您对着手册参考一下吧。R8C时钟设置都差不多。可能都不需要改动。
另外,该跟代理要的软件,还是要来好。可能瑞萨网站上也有下载,搜一下。
/********************************************************************/
/* Function name: InitClock */
/* Description : System Clock Initialization */
/* Input : NULL */
/* Output : NULL */
/********************************************************************/
void InitClock(void)
{
unsigned int i = 0;
asm("FCLR I"); /* Interrupt disable */
prc0 = 1; /* CM0, CM1, OCD, FRA0, FRA1, FRA2 Protect off */
fra22 = 0; /* On-chip oscillator divide by 5 */
fra21 = 1;
fra20 = 1;
fra00 = 1; /* High-speed on-chip oscillator on */
cm16 = 0; /* Main clock = No division mode */
cm17 = 0;
cm06 = 0; /* CM16 and CM17 enable */
while( i <= 254 ) i++; /* Slight Delay */
fra01 = 1; /* Select high-speed on-chip oscillator */
prc0 = 0; /* CM0, CM1, OCD, FRA0, FRA1, FRA2 Protect off */
asm("FSET I"); /* Interrupt enable */
}
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
Buck电路工作在CCM模式下电感电流的计算公式是什么?被打赏5分 | |
buck电路工作原理被打赏5分 | |
基于MSPM0L1306的MODBUS-RTU协议通讯实验被打赏100分 | |
每周了解几个硬件知识+485硬件知识分享被打赏10分 | |
【换取手持示波器】树莓派PICOW网页烟花被打赏18分 | |
【换取手持示波器】树莓派PICO逻辑分析仪被打赏16分 | |
【分享评测,赢取加热台】教你五分钟本地部署蒸馏版本的DeepSeekR1-7B被打赏12分 | |
【换取手持示波器】蓝牙音箱更换电池被打赏8分 | |
【换取手持示波器】鼠标更换微动开关被打赏10分 | |
【我要开发板】4.传感器移植被打赏50分 |