Skip to main content
YEren.1
Associate
March 30, 2023
Question

What is the proper and complete way to implement FDCAN to transmit a message and observe on PCAN view?

  • March 30, 2023
  • 3 replies
  • 2047 views

Hello, I am using STM32H750xBHx. I have the following code snippets where I try to transmit some CAN message and then observe this on PCAN view. However, there is no received message in PCAN view. It sometimes shows BUSHEAVY status under the trace section. Moreover, I measure with an oscilloscope and there seems no activity. Before trying these, I did the external loopback mode work (I was able to see data was transmitted), but still, I didn't see anything both on the oscilloscope and PCAN.

0693W00000bhDl9QAE.png 

0693W00000bhDlYQAU.png0693W00000bhDm7QAE.png 

the fdcan1 init is:

0693W00000bhDmWQAU.pngI also changed the timing parameters in init according to the bit timing calculator but does not work. It stays in HAL_FDCAN_IsTxBufferMessagePending forever.

In the end, what I need is to transmit a message and be able to observe it on oscilloscope and PCAN. What am I missing? Is there other configurations that I didn't consider?

This topic has been closed for replies.

3 replies

Karl Yamashita
Lead III
March 30, 2023

Do you have terminating resistors on the CAN bus?

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source
YEren.1
YEren.1Author
Associate
March 31, 2023

Yes, I have.

Karl Yamashita
Lead III
March 31, 2023

Draw out how everything is connected, power supply, terminating resistors and all. The last person that I helped had drew out his setup for me to see. He had in fact wired it incorrectly. So let's see your setup to eliminate any possible wiring issues and get that out of the way first.

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source