下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、/*在标准的 lpc236x.h 文件中添加的 ram#define */#define can_mem_base0xe0038000#define can_sff_ram(*(volatile unsigned long *)(can_mem_base + 0x00) #define can_sff_grp_ram(*(volatile unsigned long *)(can_mem_base + 0x04) #define can_eff_ram(*(volatile unsigned long *)(can_mem_base + 0x08) #define can_eff_grp_ra
2、ms(*(volatile unsigned long *)(can_mem_base + 0x0c) #define can_eff_grp_rame(*(volatile unsigned long *)(can_mem_base + 0x10)/*该初始化配置的滤波器,可接受单个标准帧: 0x300可接受标准帧组:0x400-0x430可接受单个扩展帧:0x00000300可接受扩展帧组:0x00000400-0x00000430*/ void can_init( uint32 can_btr )pconp |= (1 13);/ enable clock to the peripher
3、al pinsel0 &= 0x0000000f;pinsel0 |= 0x0000005; / port0.01, function 0x01, port0.45, function 0x10can1mod = 1;/ reset cancan1ier = 0; / disable receive interruptcan1gsr = 0; / reset error counter when canxmod is in resetcan1btr = can_btr;can1mod =0x0; / can in normal operation modeinstall_irq(can_int
4、,(void *)can_handler,highest_priority);can1ier |= 0x81;/ enable receive interrupts,enable bus error interruptscan_afmr = accf_off ;/只能在验收滤波器旁路模式或验收滤波器关闭模式才能写查找表的区配置寄存器。can_sff_ram = 0x03001301; /单个标准帧 id:0x300、0x301(禁用). can_sff_grp_ram = 0x04000430;/标准帧 id 组:0x400、0x430.can_eff_ram = 0x00000300; /
5、单 个 扩 展 帧 id:0x00000300. can_eff_grp_rams = 0x00000400;/扩展帧组起始 id:0x00000400. can_eff_grp_rame = 0x00000430;/扩展帧组结束 id:0x00000430.can_sff_sa = 0x00; /标准单个标识符.can_sff_grp_sa=0x04;/标准标识符组,因为只有两个标准帧 id,占用了四字节ram。can_eff_sa=0x08;/扩展单个标识符,因为只有一个标准帧组,占用了四字节ram。can_eff_grp_sa = 0x0c;/扩展标识符组,因为只有一个单个扩展帧 id,
6、占用了四字节ram。can_endof_table=0x14;/af 表格结束,因为只有一个扩展帧组,占用了八字节ram。can_afmr = accf_on;“”“”at the end, xiao bian gives you a passage. minand once said, people who learn to learn are very happy people. in every wonderful life, learning is an eternal theme. as a professional clerical and teaching position, i
7、 understand the importance of continuous learning, life is diligent, nothing can be gained, only continuous learning can achieve better self. only by constantly learning and mastering the latest relevant knowledge, can employees from all walks of life keep up with the pace of enterprise development and innovate to meet the needs of the market. this document is also edite
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年环境艺术设计调研报告
- 2026年食堂冬季食品安全措施
- 2026年高考生物设计实验题技巧
- 2026年班级安全工作幼儿园大班
- 2026年户外活动安排方案设计
- 2026年建队日活动策划方案
- 2026年职业大学与职业技术大学
- 2028年影视作品分成合作协议合同二篇
- 武汉国家稻米交易中心有限公司省级粮食应急保障项目检验及一站式服务中心(含附属设施)工程水土保持方案报告表
- 黄石市第十四中学改扩建项目水土保持方案报告表
- 2025年电大国际法试题及答案
- 以政府绩效与公众信任为主题撰写一篇小论文1200字
- 一例食管癌术后患者的营养护理个案
- 浙大城市学院《操作系统原理》2021-2022学年第一学期期末试卷
- 2024年保育员(中级)考试题库(含答案)
- 食品过敏原培训
- 农村饮水项目施工设计方案
- 2024年隔音装修合同范本
- (高清版)AQ 2004-2005 地质勘探安全规程
- 书法课特色端午(课件)小学生书法通用版
- 继电保护现场安全运行规程
评论
0/150
提交评论