Multiple repeat transmissions using Atmel T89C51CC01

Hi,

I'm writting code for the above chip. I can receive messages into my application using the CAN simulator no problem.
However, when I launch a message from my application, it is continuously re-transmitted (as seen on the can bus simulator). The TXOK flag is set OK and I get into my interrupt but, the only way I have been able to stop re-transmissions is by setting the CANCONCH register for the page to 0 and disabling the page.
What am I doing wrong, should the simulator mimic a reply ACK to prevent multiple re-transmissions or is it my responsibility to disable further transmissions?

Any clues?

Regards
Rob McKinley

Parents
  • You did not indicate is it data or remote frame we discuss about.
    Well, after a message object with data frame has been transmitted without errors then corresponding bit ENCHx of CANEN1/2 is cleared and CAN macro will not use this channel any more. Only one way to transmit it again is re-write CANCONCH of a message object.
    The strange thing I see is that TXOK bit has been set => so message object has been transmitted w/o errors. There are some possible reasons:
    - you re-enable transmission somewhere in your program yourself (check code again);
    - you do not clear TXOK flag before start transmission (you must do it each time to avoid dead loop on interrupt);
    - it is a bug in debugger/simulator.

    Please report result of your fix problem coz it is very interest problem for me (via private mail if so).

    Finally, as temporal workaroud: use TTC mode oc CAN macro - it will send a frame only one time even errors occur.

    Good days!

Reply
  • You did not indicate is it data or remote frame we discuss about.
    Well, after a message object with data frame has been transmitted without errors then corresponding bit ENCHx of CANEN1/2 is cleared and CAN macro will not use this channel any more. Only one way to transmit it again is re-write CANCONCH of a message object.
    The strange thing I see is that TXOK bit has been set => so message object has been transmitted w/o errors. There are some possible reasons:
    - you re-enable transmission somewhere in your program yourself (check code again);
    - you do not clear TXOK flag before start transmission (you must do it each time to avoid dead loop on interrupt);
    - it is a bug in debugger/simulator.

    Please report result of your fix problem coz it is very interest problem for me (via private mail if so).

    Finally, as temporal workaroud: use TTC mode oc CAN macro - it will send a frame only one time even errors occur.

    Good days!

Children
More questions in this forum