Dimiter - Thanks for replying so quickly. I share you concern with wintel systems but I figure a CAN bus and 10ft of cable gives me enough separation. My first thought was that the Rx ISR was getting overwhelmed but at 125K baud each CAN packet is between 750 and 1000 usec wide, so the 500 usec ISR is able to keep up. I verified this with the oscope and pin toggling - we set up a test case where we bombard the TouCAN with 1000 messages just as fast as we could send them at 125K - and the Rx ISR does fine. However, that is without an Tx messages going out. When we add a Tx transmission into the mix is when we have problems - but not every Tx - just one in a few thousand. I'm convinced that somehow the Tx routine is timed right so it touches something in a register the Rx needs, just before or during (!?!) the Rx ISR. What that is is the problem. --- In 68300@yahoogroups.com, Dimiter Popoff <tgi_earth@m...> wrote: > John, > > clearly you know what you are doing so there is little chance I > could be much help, but let me try something you did not explicitly > mention. > All the timing numbers you give suggest everything is working fine > on the 68K part of the system. My experience shows that whenever > there is a wintel part involved, it is a source of problems one > must tackle (this is why I avoid them like the plague...). > What if your DELL system fouls up every once per 1024 > or whatever counter there is and sends a too long burst, or something > of that sort? > Again, this is a very long shot, mostly triggered by my "love" to > wintel systems, but then I believe the hit chances are non-zero. > > Dimiter > > -------------------------------------------------------------------- > Dimiter Popoff > Transgalactic Instruments, Gourko Str. 25 b, 1000 Sofia, Bulgaria > http://transgalactic.freeyellow.com > > > > > To: 68300@yahoogroups.com > > From: "agawam1964" <agawam1964@y...> > > Date: Thu, 23 Oct 2003 12:05:07 -0000 > > Subject: [68300] TouCAN Dropping Messages > > > > I have five MC68376 systems communicating with a host PC via CAN > > using a proprietary protocol. We're running at 125Kbaud. One > > channel is Rx, one channel is Tx. The Tx we more or less use in a > > syncronous (polled) mode, with the Tx interrupt basically just > > clearing the IFLAG register. The Rx is normal interrupt driven. > > > > For the most part everything is running smoothly. Most of the CAN > > traffic occurs in bursts separated by several seconds, which all five > > systems weather without incident. However, the host (Dell XP system) > > needs to poll one system at a rate of about 10 hz, and every 100 > > seconds or so I'll get the Rx Buffer overrun error on that system. > > > > I instrumented the ISRs to toggle an I/O pin and found that the Rx > > ISR is 500 usec. The Rx ISR where the error is dectected doesn't > > seem to occur in heavy traffic; typically the prior ISR occurs a few > > msec before - definately no overlap with prior Rx or Tx ISRs. > > > > To help debug this I moved all other ISRs to a lower priority INT, > > including the heartbeat PIT, with no noticeable effect. My past > > experience suggests to me I'm not locking-reading-clearing the > > buffers and registers correctly, but I've reread the manual about n > > hundred times and can't see where I'm going wrong. Is there some > > subtlety about reading the TouCAN registers and buffers that isn't in > > the manual? > > > > --John > >
Message
Re: TouCAN Dropping Messages
2003-10-23 by agawam1964
Attachments
- No local attachments were found for this message.