Does anybody know what can be cause for the following problem.
When I initialize canbus pheripheral on PIC18f458, an when I issue only one send message, microcontrolller keeps sending over and over again, as if TxReq bit is always set in cancon register of the used cantx buffer. But when I check the error code for canbus, microcontroller answers that it has Tx error count 128 (namely, NO ERROR code).
I have 2 nodes, with same code - except the second microcontroller has disabled lines in C code which call SendCanMessage() function (same initialization, etc.)
If you tested it on a small distance do you have small termination resistor between lines?
Also, maybe mikropasca CANl example with pic18f458 can be useful.
**broken link removed**
Try to use loop back mode for test your code
(Careful acceptance filter in Can module )
if your code work you should get data that your send.
if still not work i think your hardware have problem.
You should have no other CAN nodes in the network or you should check that your CANTX and CANRX are properly connected.
when a node first send a message if no other node acknoledge (place an ACK bit at the end of the frame) it retryes continually then the TXERRCNT is 128 (Passive mode).