Skip to main content
Associate II
September 26, 2024
Solved

CAN id incorrect

  • September 26, 2024
  • 1 reply
  • 2744 views

I have a STM32G474 mcu that i am learning to program. I have the CANBUS tx on PA12 working by loopback mode. I have connected my logic analyzer and i receive the data correctly.

There is only one thing wrong: The ID has bit1 that keeps being set to 1. So if i would give the adress

0x200 (0b0010 0000 0000) it outputs 0b0110 0000 0000)

0x100 (0b0001 0000 0000) it outputs 0b0101 0000 0000)

 

Anyone with idea's how this is possible?

Thanks!

    Best answer by PRODNAV

    I have done both a loopback program and a normal mode program. Both show the same ID fault. I have created a totally new project. That one does work now without the issue.

     

    Thanks all.

    1 reply

    mƎALLEm
    Technical Moderator
    September 26, 2024

    Hello @PRODNAV and welcome to the community,

    No sure I understood the case.


    @PRODNAV wrote:


    There is only one thing wrong: The ID has bit1 that keeps being set to 1. So if i would give the adress

    0x200 (0b0010 0000 0000) it outputs 0b0110 0000 0000)

    0x100 (0b0001 0000 0000) it outputs 0b0101 0000 0000)


    How did you test this behavior? Could you please elaborate? maybe share screenshots?

    Thank you.

    "To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
    PRODNAVAuthor
    Associate II
    September 26, 2024

    PRODNAV_0-1727358752366.png

    As you can see, Bit 1 is high for the ID. But i have programmed 0x180 for the 11bit ID, but somehow it sets the Bit1 high

    mƎALLEm
    Technical Moderator
    September 27, 2024

    Hello,

    Do you have a communication issue? are you receiving bad ID messages in loopback mode?

    "To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."