久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 3787|回復: 0
收起左側

void IniteCANModule()

[復制鏈接]
ID:75926 發表于 2015-4-4 01:50 | 顯示全部樓層 |閱讀模式
Hi all,


I'm using TMS320F28335 eZDSP.
I program a code that use CANa to receive messages in Mailbox31 (0-15TX,
16-31RX). also I handle with the DSP/BIOS interrupt for the CANa module
(PIEACK.Group9.6 - ECAN1IntA).
I "build" a little CAN net: canAnalyzer --- eZDSP ----- CANKing

my problem is: I sending a NMT message to the net and I've got the interrupt,
but when i sending again I don't get any interrupt at all why?

I'm using the defualt TI setting for the CAN module and I add this code also for
setting the CANa module.

The code is:
void IniteCANModule()
{

// eCAN control registers require read/write access using 32-bits.  Thus we
// will create a set of shadow registers for this example.  These shadow
// registers will be used to make sure the access is 32-bits and not 16.
   struct ECAN_REGS ECanaShadow;

InitECanGpio();//from TI examples
InitECan();//from TI examples
/*Configure MSGID*/
ECanaMboxes.MBOX31.MSGID.all = 0;

/*Configure Acceptance Mask*/
ECanaLAMRegs.LAM31.all = 0x1FFFFFFF;//Don't care

/*Configure Mailboxes  */
// Configure Mailboxes 0-15 as Tx, 16-31 as Rx
ECanaShadow.CANMD.all = ECanaRegs.CANMD.all;
ECanaShadow.CANMD.all = 0xFFFF0000;//Mailbox31 defined as a receive mailbox
ECanaRegs.CANMD.all = ECanaShadow.CANMD.all;

/*Configure Mailbox protected*/
ECanaShadow.CANOPC.all = ECanaRegs.CANOPC.all;
ECanaShadow.CANOPC.bit.OPC31 = 0;//the message can be overwritten
ECanaRegs.CANOPC.all = ECanaShadow.CANOPC.all;

ECanaMboxes.MBOX31.MSGCTRL.bit.DLC = 8;

/*Enable Mailboxes*/
ECanaShadow.CANME.all = ECanaRegs.CANME.all;
ECanaShadow.CANME.all = 0xFFFFFFFF;//Enable all Mailboxes
ECanaRegs.CANME.all = ECanaShadow.CANME.all;

  EALLOW;

//configuration for interrupt handling
ECanaRegs.CANMIM.all = 0xFFFFFFFF; //16-31 mailboxes interrupt are enabled
ECanaRegs.CANMIL.all = 0xFFFFFFFF; //mailbox interrupt level (mapped to
eCAN1INT line lower priority CPU line 0)
ECanaRegs.CANGIM.all = 0x00002E06;

PieCtrlRegs.PIEIER9.bit.INTx6 = 1;  // Enable INTx.6 of INT9 (eCAN1INT)

EDIS; // Disable EALLOW protected register access

}

Please help me with this interrupt issue.
Thanks.


Check Out Industry's First Single-Chip, Multi-Format, Real-Time HD Video
Transcoding Solution for Commercial & Consumer End Equipment:
www.ti.com/dm6467

ecan接收id的問題
如果在不使用濾波的情況下,基本不用考慮id因為只有相同id得才能接收。
如果使用id濾波,那么對于增強性ecan模式來說,發送方得id就放在接收郵箱得id標志符里面,網友用程序驗證過此結論。
很多人看國外的資料都不是很明白,程序驗證后才明白得,這是由于對資料理解的不夠透徹,或者翻譯資料簡單直譯產生的不良后果。
在自測試模式下,發送方得id沒有放到接收郵箱得id標志符里面。程序燒到flash中和外面得程序通訊才看到確實放在那里。





回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

手機版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 成人av在线播放 | 99精品国自产在线 | 亚洲深夜福利 | 亚洲va欧美va天堂v国产综合 | 18av在线播放 | 91精品免费 | 国产91久久久久久 | 亚洲最大的成人网 | 91精品国产高清一区二区三区 | 免费精品| 久草在线中文888 | 成人做爰9片免费看网站 | 99精品国自产在线 | 欧美精品1区2区3区 精品国产欧美一区二区 | 91婷婷韩国欧美一区二区 | 成人综合久久 | 日韩精品久久一区二区三区 | 免费黄色a级毛片 | 亚洲国产视频一区二区 | 国产成人在线观看免费 | 国产精品久久免费观看 | 奇米四色影视 | 久久精品久久久 | 99热精品久久 | 国产乱码高清区二区三区在线 | 操操日| 国产99久久精品一区二区永久免费 | 在线天堂免费中文字幕视频 | 日韩精品视频在线观看一区二区三区 | 自拍偷拍第一页 | 久久久久国产精品午夜一区 | 一级黄色片网址 | 亚洲综合中文字幕在线观看 | 亚洲成人综合在线 | 午夜网站视频 | 91se在线 | 日本视频中文字幕 | 日日操夜夜操天天操 | 一区二区三区免费网站 | 亚洲综合色 | 久草网址 |