This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Are CAN messages continuously sent by hardware if there is no ACK?

I am using T89C51CC03 UA right now. while debugging I found out that even if I wanna send a message once ( via interrupt ), the CAN bus is full of the same message with a period of 1.5ms.

I am sure that other messages are not sent by the interrrupt routine by placing some debugging code inside it.

My question is : Are the other messages sent automatically by the hardware itself if there are no other CAN nodes on the bus to receive them?

If so, how could I solve this problem?

  • The answer your question is yes. If you broadcast a message and there are no other nodes on the bus YOUR CAN module will send the message forever. You're CAN module will start out in error active mode and NAK your message until you hit an error level and then become error passive (message is still sending). The reason is due to the fact that no one has acknowledged your message.

    You need two nodes on the bus (if your device has two CAN modules then you need to connect them together, refer to your user's manual). The other CAN just needs to be programmed to the same baud rate.

  • Thank you so much.

    I connected my controller to the message source which is a module with another CAN controller, then the problem was solved.

    So, is it possilbe to turn off the continuously message sending function? I mean message sending is up to my code even if there is no other controllers on the bus?

    Thanks
    Vince

  • Switch CAN to TTC mode.

    From AT89C51CC03 datasheet:

    In this mode, CAN only sends the frame once, even if an error occurs.

    Regards,
    Oleg

  • I guess I don't really understand your question? So are you asking how to stop a CAN message once you transmit it? Your software should recognize this type of error (AckError) and then take whatever appropriate failsafe action you need. I am not familiar with your CAN peripheral so I would recommend that you follow the procedure in the user's manual to stop a message in this case.

    The transmitter will leave the bit in the ACK slot as a recessive bit and the receiver(s) will drive a dominant bit in the ACK slot when they receive the data correctly. This is totally done by the CAN hardware peripheral in the microcontrollers.

    Perhaps you could have a look to this web site for more information or download the CAN specification from Bosch.

    http://www.can-cia.org/can/protocol

    http://www.semiconductors.bosch.de/pdf/can2spec.pdf

  • So, is it possilbe to turn off the continuously message sending function?

    Only by turning off the entire CAN controller. But that's the wrong question you're asking. The real question is: if there's no other node on the CAN bus, what on earth do you hope to achive by sending it a message? Or, to turn this around: what's so wrong with continuously trying to reach that apparently non-existant node?

  • Thanks

    Finally, I found out it was the problem of my FPGA, it blocked the CAN bus which I did not expect.

    Regards
    vince

  • It is really ok if the messages are sent automatically. I just wanna make sure that it has nothing to do with my C code since I was kind of working with other guys.

    Thanks

    Regards
    Vince