MSCAN M68EVB912DP256

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MSCAN M68EVB912DP256

1,892 次查看
Seitec
Contributor III
Hello.
 
I have problem with CAN on EVB912DP256. I am creating transmit interrupt and I can´t find three background buffer for store message associated with TXEx. I am only find foreground buffer. Do you know pleas where (how) I can store these buffers?
 
 
Thank you very much for your advice.
 
 
Ondra
 
标签 (1)
0 项奖励
回复
3 回复数

728 次查看
kef
Specialist I
MASCAN TX buffers are paged. CANTBSEL register is used to map TX buffer into CPU address space at the address of the "foreground buffer".
 
Also logics of TBSEL allows to set only one of TX2-TX0 bits. If you write more than one '1' to TBSEL, then lowest order bit will be set, and other bits be cleared. For example you write 7 - you read 1. You write 6 - you read 2. This allows to simplify code of selecting empty buffer. You just CANTBSEL = CANTXFLG, and one of free buffers is mapped to address space. In case CANTXFLG is 0, no TX buffer is selected. You want to enable interrupt for buffer currently mapped into address space? Then just CANTIER |= CANTBSEL;
 
0 项奖励
回复

728 次查看
Seitec
Contributor III
Yes, thank you very much!

Can I use it for store these three buffers

this code:

unsigned volatile char *h;
unsigned volatile char *h1;
unsigned volatile char *h2;

h=&Tx0
h1 = &Tx1
h2 = &Tx2

and after copy data tu buffer
for(k = 0; k length; k++){
*h = *my_data;
}


Really thank you very much.
0 项奖励
回复

728 次查看
Seitec
Contributor III
Oh this is not possible.
Do you know please where exactly or how I can save backgroud buffer for Transmit MSCAN?
 
Thank you
0 项奖励
回复