Lots of CAN errors on CY8Ckit-059

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
LaMe_4502671
Level 1
Level 1

I'm trying to create a module that listens to CANbus using a CY8CKIT-059 with an MCP2551 CAN transceiver, and it's not working at all.

I've created an empty project with a CAN component, and implemented every interrupt callback as a function that increments a counter and toggles the LED. When I run it, there's a constant stream of error interrupts. The LED pin emits an almost perfect 29Hsz square wave, so an interrupt every 17ms, mostly bit stuffing errors and bit errors, and a few overloads, even when the CAN bus is idle (whether or not there's traffic on the bus doesn't seem to effect behavior). When I do post messages to the bus using one of the other devices, the CAN_ReceiveMsgCallback never gets called.

I have one receive buffer set to basic, and all the transmit buffers disabled. I have 3 other devices on the CAN bus (a bus debugger and 2 motor controllers), and they all get along fine, but the PSoC gets nothing but errors. I've scoped the bus and the transceiver output looks correct, I've double checked that all the bauds match up (250kbps). I'm guessing I'm doing something wrong with the component initialization or clocks. I've never done CAN before so I'm a bit at a loss as to where to start debugging.

Attached is the project that demonstrates the issue.

Thanks in advance for any help

-Landon

0 Likes
1 Solution
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi LaMe_4502671​,

Did you check if your issue is listed in the following article Control Area Network (CAN) Protocol Troubleshooting Guide for PSoC® - KBA224456​. This is a good starting point for debugging your CAN projects. Please get back to us if your issue is still not resolved. We are happy to help!

In addition to that we recommend you to work on an existing working Code example and make sure there are no issues with your hardware setup. PSoC Creator > File > Code Example

pastedImage_1.png

Reference app note:

https://www.cypress.com/documentation/application-notes/an52701-psoc-3-and-psoc-5lp-getting-started-...

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

0 Likes
1 Reply
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi LaMe_4502671​,

Did you check if your issue is listed in the following article Control Area Network (CAN) Protocol Troubleshooting Guide for PSoC® - KBA224456​. This is a good starting point for debugging your CAN projects. Please get back to us if your issue is still not resolved. We are happy to help!

In addition to that we recommend you to work on an existing working Code example and make sure there are no issues with your hardware setup. PSoC Creator > File > Code Example

pastedImage_1.png

Reference app note:

https://www.cypress.com/documentation/application-notes/an52701-psoc-3-and-psoc-5lp-getting-started-...

Regards,

Bragadeesh

Regards,
Bragadeesh
0 Likes