Need suggestion on CAN ntransmission

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

Reply to
Charan
Loading thread data ...

Probably due to standard CAN newbie error #1 or #2: trying to test CAN without a correctly wired bus, or with only a single working CAN node on the bus.

Check your cables; check the CAN documentation on what happens if you send and there's nobody out there who knows how to listen.

--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
Reply to
Hans-Bernhard Broeker

On 8 Mar 2006 08:29:22 -0800, "Charan" wrote in comp.arch.embedded:

To provide more detail on what Hans-Bernhard said, you cannot have a successful CAN transmission unless there is at least one other CAN node on the bus that sees the transmission and generates the ACK for it.

Do you have another CAN device connected, working at the same bit rate?

There are relatively inexpensive USB to CAN adapters that you can use on a PC to send packets to your target, and show you whatever your target sends. That is what we initially used bringing up a CAN network on all new boards.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
Reply to
Jack Klein

hi all! thanks for your valuable replies!.Now i need clarification on CAN WAKE UP function Register. how should i use CAN WAKE UP for CAN Reception(i mean should i connect both the CAN Rx and INT pin internally? i.e. enabling the CAN WAKE UP function register.what would happen if i not set this register) and also for transmission.And also as you all said i have another node for receiving the transmitted data ,and my Receiver and transmitter node uses the transceiver PCA82C250. Can i connect those two CANH,CANL pins of both transceiver through multistrand or singlestrand wire. do i need to use some other specialized connector(wire) to connect those pins.plz suggest me,waiting for your valuable suggestion.

Regards, Charan

Reply to
Charan

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.