problem dealing with two CANs

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

problem dealing with two CANs

335 Views
karlsl
Contributor I

Hi, I am using MC9S12 MCU for a project which requires receiving messages from two separate CANs from a vehicle. The problem I am having is that one of the CAN interrupt will randomly stop receiving message from the CAN bus. when this happens, I have to restart the program again.

I never have this problem when dealing with receiving from one CAN. I have tried setting one CAN with high priority and another with lower priority but the problem persists. logically, I assume this happens when interrupt from one CAN happens before another CAN has finished processing the message. Is there a way to solve this problem? thanks,

Labels (1)
0 Kudos
1 Reply

273 Views
RadekS
NXP Employee
NXP Employee

Hi carl,

Could you please specify your MCU derivative? CAN interrupts are managed by CPU or XGATE?

Which version of CW you use?

Contains your CAN routines any loops which could be potentially infinite?

Did you implement CAN Error Interrupt routines?

I suppose that CANs have independent external transceivers. Could you please check whether new data correctly arrived to MCU pins?

Are you sure that CAN codes do not share any global variable for processing?


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos