Hi Klaus,
The thing is that I really dont know if the IRQ is disabled for a
longer time, im using the freeRTOS port for LPC2129 so. If anyone
here knows, your can pleas tell me, or I will start to have a look
inside the code for the freeRTOS.
BTW Klaus, in your system, how many systems are talking on the same
bus? Im using 3 units talking and the Bus Load not greater than 20-
30%.
B.R
/Fredrik
--- In lpc2000@yahoogroups.com, "Gromann, Klaus"
<klaus.gromann@r...> wrote:
> Hi Frederik,
>
> sorry, I've overseen the line with the request. So this cannot be
the problem.
> Is it possible that the IRQ is disabled for a longer time period ?
> I use the CAN on LPC2294 now for about 8 weeks and got no problems.
>
> brgds
> Klaus
>
>
> -----Ursprüngliche Nachricht-----
> Von: lpc2000@yahoogroups.com im Auftrag von Gromann, Klaus
{GGRH~Graz}
> Gesendet: Do 15.09.2005 16:16
> An: lpc2000@yahoogroups.com
> Betreff: AW: [lpc2000] CAN DOIE
>
> Hi Fredrik,
>
> there are 2 things in your code that may cause problems :
>
> 1) You don't read the frame status register(CANRFS), so you loose
the information if it is a 11-bit or a 29 bit identifier as well as
the data length information and the remote request bit.
>
> 2) It is written in the comment but not done : release the buffer.
To do this, you have to write 1 to bit2 in the command register
(CANCMR)
>
> brgds
> Klaus
>
> -----Ursprüngliche Nachricht-----
> Von: lpc2000@yahoogroups.com im Auftrag von albin_martinsson
> Gesendet: Do 15.09.2005 15:35
> An: lpc2000@yahoogroups.com
> Betreff: [lpc2000] CAN DOIE
>
> Hello
>
> Im using the CAN-interface in my application.
> My routine for CAN is interrupt-driven, here is an example of my
ISR-
> code:
>
> I often get Data Overrun - error on the receive channel.
> Anyone who has had the same problem?
> I also use the freeRTOS port for the LPC2129.
>
> B.R
>
> Fredrik Martinsson, Sweden
>
> void ISR_CANRX (void)
> {
> tU32 *cBufdst;
> tU32 Buf[3];
>
> while (C1GSR&0x01) {
> // Save registers temp.
> Buf[0] = C1RID;
> Buf[1] = C1RDA;
> Buf[2] = C1RDB;
> C1CMR = 0x04;
> // release receive buffer
>
>
> if (++can_rxbufin>=CAN_QUEUESIZE)can_rxbufin = 0;
> cBufdst = &can_rxbuf[can_rxbufin].CmRID;
>
> if (can_rxbufin == can_rxbufout) {
> if (++can_rxbufout>=CAN_QUEUESIZE)can_rxbufout = 0;
> }
> if (++can_rxbufsize>CAN_QUEUESIZE)
> can_rxbufsize=CAN_QUEUESIZE;
>
> *cBufdst = Buf[0];
> cBufdst++;
> *cBufdst = Buf[1];
> cBufdst++;
> *cBufdst = Buf[2];
>
> // Give semaphore to start comTask
> xSemaphoreGiveFromISR( comSem, pdFALSE );
> }
>
> VICVectAddr = 0xFFFFFFFFL;
> // acknowledge Interrupt
> }
>
>
>
>
>
>
> SPONSORED LINKS
> Microprocessor <http://groups.yahoo.com/gads?
t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+mi
crocontrollers&w4=8051+microprocessor&c=4&s=93&.sig=tsVC-
J9hJ5qyXg0WPR0l6g> Microcontrollers
<http://groups.yahoo.com/gads?
t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+
microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=DvJVNqC_pqRTm8X
q01nxwg> Pic microcontrollers <http://groups.yahoo.com/gads?
t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=
Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=TpkoX4KofDJ
7c6LyBvUqVQ>
> 8051 microprocessor <http://groups.yahoo.com/gads?
t=ms&k=8051+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=P
ic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=1Ipf1Fjfbd_H
VIlekkDP-A>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>
>
> * Visit your group "lpc2000
<http://groups.yahoo.com/group/lpc2000> " on the web.
>
> * To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com <mailto:lpc2000-
unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
>
>
> ________________________________
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
>
> SPONSORED LINKS
> Microprocessor <http://groups.yahoo.com/gads?
t=ms&k=Microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=Pic+mi
crocontrollers&w4=8051+microprocessor&c=4&s=93&.sig=tsVC-
J9hJ5qyXg0WPR0l6g> Microcontrollers
<http://groups.yahoo.com/gads?
t=ms&k=Microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=Pic+
microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=DvJVNqC_pqRTm8X
q01nxwg> Pic microcontrollers <http://groups.yahoo.com/gads?
t=ms&k=Pic+microcontrollers&w1=Microprocessor&w2=Microcontrollers&w3=
Pic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=TpkoX4KofDJ
7c6LyBvUqVQ>
> 8051 microprocessor <http://groups.yahoo.com/gads?
t=ms&k=8051+microprocessor&w1=Microprocessor&w2=Microcontrollers&w3=P
ic+microcontrollers&w4=8051+microprocessor&c=4&s=93&.sig=1Ipf1Fjfbd_H
VIlekkDP-A>
>
> ________________________________
>
> YAHOO! GROUPS LINKS
>
>
> * Visit your group "lpc2000
<http://groups.yahoo.com/group/lpc2000> " on the web.
>
> * To unsubscribe from this group, send an email to:
> lpc2000-unsubscribe@yahoogroups.com <mailto:lpc2000-
unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
>
>
> ________________________________
>
>
>
>
> [Non-text portions of this message have been removed]Message
Re: CAN DOIE
2005-09-16 by albin_martinsson
Attachments
- No local attachments were found for this message.