cancel
Showing results for 
Search instead for 
Did you mean: 

FlexCAN problems on SPC560 Discovery

warren2
Associate
Posted on March 22, 2015 at 07:52

I'm having problems getting the demo code to successfully RX on FlexCAN0 and then TX on FlexCAN1 (and vice versa).

canReceive() detects the new message and returns MSG_OK when using a breakpoint in canlld_receive() and stepping code. Then canTransmit() loads the TX mailbox on the other CAN with the received CAN ID and data. However, the code never seems to trigger a breakpoint when checking for MSG_OK in main(). (Demo code cut from one of the OS-less CAN demo's.

Data is being received as I am successfully seeing it when copied to the periodic TX I also have running.

SOmetimes the TX from the RX can be seem, but it only comes out with the periodic TX.

Any ideas:

- RX not returning MSG_OK (corrupted) when running in realtime?

- What might delay TX until another TX?

I believe double checked PADSEL, etc are OK.

Note: I also found that USB only connection only puts out 3.3V on 5V. You need to use the 12V input if you are attaching CAN transceivers.

0 REPLIES 0