CAN Implementation using lpc1768

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CAN Implementation using lpc1768

1,584 Views
Mithunv
Contributor I

Hi Nxp support team,

I am trying to use lcp1768 is normal operation mode and transmit a CAN message through it.

currently I am facing transmit error issue whenever I try to transmit a message.

i.e as soon as LPC_CAN1->CMR = 0x21; register is set to the value 0x21 I am seeing can mode getting set to reboot and ICR register is having 0x0030000 values which is nothing but start of frame error.

hardware connections

From LPC1768 i am connecting CAN1 tx to mcp2551 tx and LPC1768 rx i am connecting it to mcp2551 rx .

Currently i am using coocox ide and i have attached my complete project . 

Please let me know where is the problem. 

 

Labels (1)
0 Kudos
Reply
2 Replies

1,565 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Mithunv,

First confirm, have you connect to another CAN Node with your LPC1768 CAN?

There is CAN demo based on lpc1769 under LPCopen, recommend you first to refer to.

https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcop...

 

BR

Alice

0 Kudos
Reply

1,577 Views
frank_m
Senior Contributor III

> register is set to the value 0x21 I am seeing can mode getting set to reboot and ICR register is having 0x0030000 values which is nothing but start of frame error.

I suppose that would point to a hardware issue. I am not very proficient with the LPC176x CAN peripherla, though. A CAN node creates an error when it is unable to get a message out, e.g. there is no other device on the bus.

You can try loopback mode (connect Tx and Rx, not sure if it's directly supported by the LPC176x), or connect two devices directly on board logic level (Rx->Tx, Tx->Rx, and GND).

Hi Nxp support team, ...

While some NXP staff members are active here, a lot of posters (like me) are NXP users and volunteers, and not affiliated with NXP. This is an open forum, hosted by NXP.

The main difference is, no answer guaranteed.

 

 

 

0 Kudos
Reply