RE: CANOpen illegal messages
"John Dammeyer" <[email protected]> Sun, 3 May 2015 23:11:08 -0700
| Newsgroups | gmane.comp.hardware.bus.can |
|---|---|
| Message-ID | <[email protected]> |
Hi Uwe, Thanks for the feedback. The problem showed up when a client's product appeared to be either producing a 0 length NMT or responding to a 0 length NMT by entering STOP. Turns out it was my code that was generating the 0 length NMT and their product handling it badly. On my end it turns out the PIC30 C compiler wasn't catching an array that was improperly subscripted. So the data passed to the CAN Send routine had garbage in it. Only happened when my software had a heartbeat at exactly the same time as an SDO and the message was placed into the transmit Q rather than directly to the CAN hardware. The up side is we've found an issue in our client's product and they will fix that on their next revision. And I've learned to not trust the PIC30 C compiler. It was probably doing what I told it but not what I was thinking I told it. John From: [email protected] [mailto:[email protected]] On Behalf Of Uwe Koppe Sent: May-03-15 10:56 PM To: [email protected] Subject: Re: [CANLIST] CANOpen illegal messages Hi John, the official CANopen position is that only NMT messages with the correct DLC value (i.e. 2) are processed, other DLC values are ignored.There is no service (EMCY) defined to report an incorrect NMT message. BTW: in our CANopen stack we have a hook function for those "malformed" NMT messages, because several CAN bootloaders (e.g. ATMEL) use the ID 0 for their own protocol. Best regards, Uwe Thanks. Specifically I'm wondering what the official CANOpen position is on this. I believe a node should ignore incorrectly formed messages. Just wondering if it's a rule for CANOpen. -- --------------------------------------------------------------------- MicroControl GmbH & Co. KG Junkersring 23, 53844 Troisdorf, Germany Homepage: www.microcontrol.net Facebook: www.facebook.com/MicroControl.net Twitter : http://twitter.com/_microcontrol_ ---------------------------------------------------------------------