Hi Georg You might look at the CANbus technical specification to see what is the fastest way to reduce the REC counter. I know that some errors will *add* 8 to the counter. If there is anything the target can do that will subtract more than one from its error counter, you could have the target send many of those. But REC is very read-only. It shouldn't take many milliseconds to send 128 clean frames as part of the startup handshake, unless your baud rate is REALLY low. Rick Corey -----Original Message----- From: Bende Georg [mailto:] Sent: Wednesday, May 28, 2003 4:38 AM To: Corey, Rick Cc: Subject: AW: [motoroladsp] MSCAN interface on 56f803 Hello Rick, Thanks for your kind answer. Changing setup works for me and I can read REC register in any state. I also managed to have automatic baud rate detection by simply monitoring this counter - but I'd like to reset it after the correct baudrate has been detected. I know that after a while it would automatically decrease, but if the target baudrate is very low, I am too close to the "error passive" limit at the end of the detection process. So, is there any way completely resetting the CAN interface or just the REC itself? Thanks for any kind of help, Georg Bende Softwareentwickler Abteilung Elektronik Dr. Fritz Faulhaber GmbH & Co KG Daimlerstr. 23 71101 Schaich Tel: +49 7031 638294 -----Ursprgliche Nachricht----- Von: Corey, Rick [mailto:] Gesendet: Dienstag, 27. Mai 2003 17:33 An: Bende Georg Betreff: RE: [motoroladsp] MSCAN interface on 56f803 Georg, Get into Soft Reset (8.8.1.9, 8.10.5 & 8.10.4), maybe going into Sleep mode first. Then you can set up MSCAN in a new way. Merely auto-detecting baud rate may not do everything you wish. If the Sender is using a different bit timing setup than you are, perhaps the bit timings can be different enough to interfere with communication (I don't know, I just use the same bit timing setup on both sides. I have 56803 on both sides. I've noticed something that may help you. If I set up two nodes with mis-matched baud rates (and they are the only two nodes on the network), whichever node first tries to send a packet goes into a forever-loop re-sending that packet over and over, until it gets a clean ACK. However, if there are more than two nodes, any two nodes that agree on the baud rate will terminate the re-try process. By the way - I never had any luck reading the "REC/TEC" registers. I think you might have to go into Soft Reset, then read them, then go back active. I rely on the error interrupts RWRNIF, TWRNIF, RERRIF etc. Good luck! -----Original Message----- From: Bende Georg [mailto:] Sent: Monday, May 26, 2003 8:33 AM To: Subject: [motoroladsp] MSCAN interface on 56f803 Hello, I'm wondering if anyone met the following problem: I'd like to have a CAN device with automatic baudrate configuration. In the MSCAN specs there's a special "listen only" mode which eases this, but unfortunately the MSCAN implementation of the 56f803 doesn't have this operation mode. Because of this I thought an implementation with some minor CAN violation would be the solution, with listening to the bus and if errors occur, then reset CAN and change baudrate. (in CANOpen there are a limited number of fixed baudrates) But if I once enable CAN, I'm not able to disable it since this bit is write once, and I didn't find any solution for totally resetting the CAN interface, or just the error counter. Could anyone please give me a clue how to solve the situation? Best wishes: Georg Bende Softwareentwickler Abteilung Elektronik Dr. Fritz Faulhaber GmbH & Co KG Daimlerstr. 23 71101 Schaich Tel: +49 7031 638294 Yahoo! Groups Sponsor <http://us.adserver.yahoo.com/l?M$7865.3355058.4641699.1512248/D=egroupmai l/S=:HM/A82387/rand(6805605> _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/motoroladsp <http://www.yahoogroups.com/group/motoroladsp> More Groups: http://www.dsprelated.com/groups.php3 <http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/> Terms of Service. |