Forum: ARM programming with GCC/GNU tools data overrun LPC1768

Author: Tom (Guest)
Posted on:

Rate this post
0 useful
not useful
I just wanted to know if anybody is well schooled in data overrun with 
the LPC1768.

Maybe I am wrong but i think that there are two receive buffer, one for 
the last message and the other one for the one which is receiving when 
the other is processed.
If there is a third message a data overrun occures.

Does anybody know how I can see that there is a data overrun and how I 
can avoid it?
Maybe it is enough when I am reset my receive buffer by writing a "0" 
into the buffer?


Author: Tom (Guest)
Posted on:

Rate this post
0 useful
not useful
When I receive a message an interrupt occurs and the data will be 
processed. But there occurs an DOS so my controller is maybe to slow? it 
works with 12MHz and the CPU with 90MHz and my CAN data come in with 
500KB/s has anyone an idea how I can avoid that data overrun?
void CAN_ISR_Rx1( void )
  uint32_t * pDest;                  

  /* initialize destination pointer  */
  pDest = (uint32_t *)&MsgBuf_RX1;
  *pDest = LPC_CAN1->RFS;  /* Frame  */

  *pDest = LPC_CAN1->RID; /* ID  */

  *pDest =  LPC_CAN1->RDA; /* Data A */

  *pDest = LPC_CAN1->RDB; /* Data B  */

  //Data_Score();        /* jedem Nachrichtenteil A oder B nach der ID geordnet ein Feld zuweisen*/
  CAN1RxDone = TRUE;


 // LPC_CAN1->CMR = (0x01 << 2); /* release receive buffer */
  LPC_CAN1->CMR |= (1<<1);
  LPC_CAN1->CMR |= (1<<2);
  LPC_CAN1->CMR |= (1<<3);
 /* LPC_CAN1->RFS = 0;
  LPC_CAN1->RID= 0;
  LPC_CAN1->RDA= 0;
  LPC_CAN1->RDB= 0;*/



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.