cancel
Showing results for 
Search instead for 
Did you mean: 

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

YEren.1
Associate

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?

3 REPLIES 3
Karl Yamashita
Lead III

Do you have terminating resistors on the CAN bus?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.
YEren.1
Associate

Yes, I have.

Karl Yamashita
Lead III

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.

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.