hi all! here i am doing a project using Fujitsu controller(MB90F428).here i have a problem on CAN transmission.when i say Treq =1, the can transmits data but it does it endlessly and also the TCR register does not become 1.i set the baud rate as 100kbs.and i use the Buffer 5 for CAN transmission.i set all the necessary registers like IDER,BTR,IDR,AMSR,DLCR,RFWTR,TRTRR,TIER,CSR. do i need to set any other registers for CAN transmission. the below is my transmission routine, #define CAN_HALT IO_CANCT.CSR.word & 0x0001 void main() { __DI(); CAN_init(); CAN_buffer5(); IO_CANCT.TIER.bit.TIE5 = 1; IO_CANID.DLCR[5].word = 0x02; IO_CANID.DTR[5].BYTE0_3 = 0x0A0A0000; IO_CANID.DTR[5].BYTE4_7 = 0x00D0C0A0; __EI(); IO_TREQR.bit.TREQ5 = 1; // transmition request: TREQ5 = 1
} void CAN_init(void) { IO_CANCT.CSR.word = 0x0081; while (!CAN_HALT);
IO_TCANR.word = 0xffff; IO_BVALR.word = 0; IO_CANCT.BTR.word = 0x5CC7; IO_CANCT.CSR.word = 0x0080;
while (CAN_HALT); IO_CANCT.AMSR.lword = 0; IO_CANCT.AMR0.lword = 0; IO_CANCT.AMR1.lword = 0; } void CAN_buffer5(void) {
IO_BVALR.bit.BVAL5 = 0;
IO_CANCT.IDER.bit.IDE5 = 1; IO_CANID.IDR[5].lword = 0x27F7DCB0;
IO_CANCT.TIER.bit.TIE5 = 0;
IO_CANCT.RFWTR.bit.RFWT5 = 0;
IO_CANCT.TRTRR.bit.TRTR5 = 0; IO_TCR.bit.TC5 = 0;
IO_TREQR.bit.TREQ5 = 0; IO_BVALR.bit.BVAL5 = 1; // message buffer is valid
}do i need to set or initialize any other registers,here i am struggling to solve this problem,plz suggest me on this.
Regards Charan