


下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五年度汽车保险代理合同
- 二零二五年度花卉租摆与植物养护服务合同
- 二零二五年度信用卡透支贷款协议书
- 二零二五年度银行与交通企业物流金融合同标准
- 二零二五年度事业单位专业技术聘用合同(事业单位公共卫生)
- 二零二五年度日本语言学校入学合同
- 二零二五年度古风建筑贴砖人工合同
- 二零二五年度生物科技研发三方合伙经营协议书
- 转正发言稿简短表态
- 2025年河北货车资格从业资格证考试答案
- 临床家庭化产房开展经验分享
- 寒区作战伤员的护理
- 安徽省六安市裕安区六安市独山中学2024-2025学年高一上学期11月期中生物试题(含答案)
- 低血糖的护理查房
- GB/T 44718-2024城市轨道交通无障碍运营服务规范
- DB41T 2567-2023 消防技术服务机构服务规范
- 2024年职工普法教育宣讲培训课件
- 音乐鉴赏与实践 第一单元第四课音乐的力量(下)
- 自编冷库库容制冷量设备对照表
- 《外科护理学(第七版)》考试复习题库-上(单选题)
- 92枪械课件教学课件
评论
0/150
提交评论