2014-01-15 03:21 AM
2014-01-15 06:33 AM
Hi,
I cannot say anything about the CAN interface, since I never used it.But your interrupt routine looks a little strange ?First off you need to make sure that the activity in the irq function does not take too much time. Also, I think you better clear the interrupt after it has been served?Regards,rygelxvi2014-01-15 06:46 AM
You can't loop back on one bus transceiver. CAN requires a minimum of two nodes to work...one has to transmit the recessive idle bits while the other is listening before a transmission. You can do an internal loopback inside the STM32 by setting both loopback and silent mode bits. This disconnects the external bus transceiver.
Make sure you have a terminator at both ends as well. You'll get a lot of passive errors if the line isn't terminated. Jack Peacock