MSCAN M68EVB912DP256

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MSCAN M68EVB912DP256

1,893件の閲覧回数
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 返答(返信)

729件の閲覧回数
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 件の賞賛
返信

729件の閲覧回数
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 件の賞賛
返信

729件の閲覧回数
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 件の賞賛
返信