Hi Ma Hui,
i went through the reference manual, i have few clarifications to make with transmitting the CAN message.
1. first i make INITRQ = INITAK = 0
2. then read CANTFLG
3. later write CANTFLG to CANTBSEL
and now i also have send function which is as given below,
void MSCAN0_send(){
MSCAN_CANTBSEL = MSCAN_CANTFLG;
MSCAN_TSIDR0 = 0x12; /* ID of the CAN message is 0x123 */
MSCAN_TSIDR1 = 0x60;
MSCAN_CANCTL0 &= ~MSCAN_CANCTL0_INITRQ_MASK; /* Disable INIT mode ************/
MSCAN_CANCTL1 &= ~MSCAN_CANCTL1_INITAK_MASK; /* Disable INIT mode ************/
if(MSCAN_CANTFLG & 0x01){
for(i=0;i<5;i++){
MSCAN_TEDSR(i) = transmit[i];
}
}
}
now i can the data to be Tx in respective reg so how do i push this buffer into CAN bus, am i missing some thing here ??
Regards,
Jashan M