2019-05-11 08:35 AM
I am currently working on a project for a Battery Management System. For this I need to communicate with the rest of a car via CAN. However, my CAN has strange behaviour when sending messages.
When I try to send a message at 4Hz (so not fast at all), my Data is correct (I read out my CAN bus using an analyzer) but the CAN-ID is completely wrong (011C072E in stead of 047). However, when I send at 1Hz there is no problem. Between these two cases I did not change anything except for the timer prescaler (in the timer interrupt I set a flag which is read in the while loop and then the message gets send)
My CAN works at 1Mbit and the clock configuration is attached below:
I have no idea what the problem could be, especially since I used the same chip for another project and had no trouble with CAN at all.