2024-09-26 04:33 AM
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!
Solved! Go to Solution.
2024-09-30 02:21 AM
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.
2024-09-26 04:50 AM
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 adress0x200 (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.
2024-09-26 06:53 AM
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
2024-09-27 12:32 AM
Hello,
Do you have a communication issue? are you receiving bad ID messages in loopback mode?
2024-09-27 04:57 AM
The communication is all correct in external loopback mode. Only the can id is incorrect on one bit (bit1). No matter what id i chose, that bit stays high.
2024-09-27 05:26 AM
In that case you need to check your analyzer and its configuration. I don't think there is a an issue with the ID transmission.
2024-09-27 05:41 AM
I actually also checked with my oscilloscope. Same bit stays high in the id.
2024-09-27 06:03 AM - edited 2024-09-27 06:03 AM
Attach a minimal project that reproduces the behavior so we could analyze it later ..
2024-09-27 11:47 PM
2024-09-30 01:59 AM
Hello,
Thank you for the sharing.
The attached txt contains a configuration of Normal mode contrarily to what you said in the first post.
For efficiency purposes, please attach a complete minimal working project in Loopback mode that you used to reproduce the behavior.
Thank you.