Skip to main content
Explorer II
April 30, 2024
Solved

CAN Frame Repeating, but is received

  • April 30, 2024
  • 2 replies
  • 9027 views

Summary: I'm seeing a situation where the CAN frames are repeating when they should only be sent once.  However, the receiving device is receiving them just fine.  

Details:

I'm running an STM32U545 on it's Nucleo Board, and using a simple CAN transceiver chip.  I'm sending pre-made dummy messages to spoof an external device, and have verified those messages work using an STM32L431.  The frame is being sent once every 200ms, and the code is sitting in HAL_Delay() the rest of the time.  

The number of repeated frames is not consistent.  I'm looking on the scope/Saleae, and it can be anywhere from 1 to several (like 7 or 10), and anywhere in between.  The Saleae interpreter is reporting an ACK being received, so that shouldn't be the issue.  

Bit rate: 250k

Is there anything else I should check?

    This topic has been closed for replies.
    Best answer by mƎALLEm

    Hello,

    I'm adding screenshots from my logic analyzer:

    SofLit_1-1715174152411.png

    If you can see the interval between frames are 150ms as I already programmed in the code and the frames on CAN_Tx and CAN_Rx are correct. So again no repeating behavior.

    I've also attached the project with a minor changes: 

    - Add disable/enable_irq in H5 FW.

    - Add Tx header in L4 FW / data length = 2 bytes.

    If it does answer your question, please mark accept as solution to close the thread.

    Thank you

    2 replies

    Technical Moderator
    April 30, 2024

    Hello,

    If you disable the auto-retransmission? do you get the same behavior?

    sethkazAuthor
    Explorer II
    April 30, 2024

    Auto-retransmission was already disabled.  I tried enabling it, but it didn't fix the problem.  Nor did re-disabling it.  

    I also tried changing it from FIFO to Queue mode, and no change in behavior. 

    Technical Moderator
    April 30, 2024

    You need to share your code for the two nodes STM32U545 and STM32L431.

    What tranceiver you're using for both nodes?

    What clock source are you using for both nodes? HSI? HSE? 

    Technical Moderator
    May 20, 2024

    Hello @sethkaz ,

    Could you please give a status of this issue?