cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor

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
Reply
1 Solution
Moderator
Moderator

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
Reply
1 Reply
Moderator
Moderator

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
Reply