We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I'm writting code for the above chip. I can receive messages into my application using the CAN simulator no problem. However, when I launch a message from my application, it is continuously re-transmitted (as seen on the can bus simulator). The TXOK flag is set OK and I get into my interrupt but, the only way I have been able to stop re-transmissions is by setting the CANCONCH register for the page to 0 and disabling the page. What am I doing wrong, should the simulator mimic a reply ACK to prevent multiple re-transmissions or is it my responsibility to disable further transmissions? Any clues? Regards Rob McKinley
Oleg, I think you're missing the point to some extent. All that stuff you're writing about concerns the Atmel chip's end of the communication. The failure discussed by the original poster is on the other end of it. The problem at hand is that the destination node, in case of a programming running inside the Keil simulator, is really the simulator itself. The simulator would have to simulate the successful receipt of the message by at least one station on the CAN bus by generating the ACK condition. According to the OP, it fails to do that, and that would, indeed, constitute a bug. On at least one other CAN-enabled 8051 variant (the Dallas 80C390) I'm quite sure the simulator does that correctly --- I've been using that for about a year now. So it can be done, but the Atmel chip's simulation doesn't get it right. As to that comment about being in "open loop" from that Atmel technician: it cannot possibly apply to CAN bus transactions, ever. CAN is *always* in closed loop, in the sense that the receiver must watch the bus at all times, including those times when the chip itself is transmitting a message. That's part of the very definition of CAN bus.
I agree with you, Hans... Just one note: CAN is *always* in closed loop - try to pull out physical connector of the node and you have got open loop. Simulator does not know about has transmitter differencial line connected or does not. Realy, you should have this option in simulator otherwise you will not be able to simulate such situations when no node has received a frame from transmitter. Good days!
Dear Oleg Sergeev, Thank you very much for the superb explanations about TTC mode. Now i understund what this mode is and i will re-read the manual more carefuly. Also, if you have some news from Atmel regarding CAN macro problem in TTC mode, plz inform us: it's verry important. PS: Sorry to Robert for using his thread for a litte "of topic " subject, but Oleg's reply was so interesting that i must ask him some details. Cheers!!