cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723VGT6 FDCAN unable to see waveform from oscilloscope in external loopback mode

Angelo3
Associate III

Hi 

I am trying to send some CAN-bus messages from a STM32H723VGT6

I am following this video to send standard CAN messages in external loopback mode (https://www.youtube.com/watch?v=kXyzaaSk6Qs&t=568s&ab_channel=ControllersTech).

The code seems to be working as I am using some blinking LEDs to monitor the sending and receiving of messages

However I tried to connect an oscilloscope to the bus to monitor the waves and I am not able to see the messages that are being sent from the board

To make sure that my setup is working correctly I added another node to the bus and I am able to read its messages correctly (I made sure to have the bus resistance set to 60ohm)

Do you have any idea why the board woud appear to be able to send and receive messages in external loopback mode but we only see radio silece with the oscilloscope?

 

If I try to use Nomal mode instead I keep seeing nothing with the oscilloscope and after a couple of second the LED stops blinking and I get error 512 (the other node is still connected to the bus)

Angelo3_0-1731335751041.png

 

Attached you can find both the code and the schematics of the board I am using. Note however that there is a mistake in the schematics. The pins used for CANbus and USB are swapped. So in the actual board pins PA11/PA12 are used for CANbus and PB8/PB9 are used for usb.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello,

I've tested your code (I've attached a complete project) on NUCLEO-H723 and I could see CAN frames on Tx (PA12):

Zoom-out:

SofLit_0-1731404594959.png

Zoom-in:

SofLit_2-1731404826061.png

Now, I'm pretty sure there is something on the HW:

Either you have something forcing the Tx output on the board or you are not probing the right pin or you have something wrong on the oscilloscope: probe issue, config issue etc ..

So what I suggest at this stage is to try to toggle the pin PA12 (FDCAN_Tx) and check with the oscilloscope if it's toggling well ..

Hope it helps.

 

 

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.

View solution in original post

6 REPLIES 6
SofLit
ST Employee

Hello,

This is the continuation of this thread: https://community.st.com/t5/stm32-mcus-products/stm32h723vgt6-fdcan-0x20-error-on-trasmission/td-p/741256

 

There are confusions in this new post. 

Your are using Loopback then you test in normal mode.

Let's keep Loopback mode as indicated in the title.

My questions in loopback mode:

1- Did you have FDCAN Rx interrupt firing?

2- Are you sure Tx/Rx pins are not connected to nothing in the board as I suggested in the other thread (mentioned above)? This is an important point.

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.

Sorry I pressed accept solution by mistake

Sure let's clear up loopback mode first

1- Yes FDCAN Rx interrupt is firing. I connected it with a led to make sure

Angelo3_0-1731338269042.png

2- Yes, the tx rx pins are connected only to the canbus connector. I verified this with a multimeter


@Angelo3 wrote:

Sorry I pressed accept solution by mistake


I removed it.

If the Rx interrupt is firing you've already almost did the job.

Based on your CubeMx config:

SofLit_0-1731338831624.png

It's OK but could you please modify the speed of the IO to be High?

Meanwhile, your main is not complete as indicated in the previous thread, please share the complete main.c you are using for the test. 

Are you sure you set the correct trigger level and edge on the oscilloscope?

 

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.
  1. I tried to modify the speed of the IO to be High but nothing changed
  2. I had flagged the Angelo3_0-1731339866377.png. I now removed it and attached main.c and main.h again. Let me know if you need anything else
  3. Yes, as I mentioned we also tried to connect another device to the bus and we are able to detect its messages correctly.
  4. Just to make sure we also tried to connect the oscilloscope directly to the fdcan pins of the microprocessor and we still can't see anyhting 

     

Hello,

I will try to test it tomorrow on a Nucleo board and get back to you with the results. 

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.

Hello,

I've tested your code (I've attached a complete project) on NUCLEO-H723 and I could see CAN frames on Tx (PA12):

Zoom-out:

SofLit_0-1731404594959.png

Zoom-in:

SofLit_2-1731404826061.png

Now, I'm pretty sure there is something on the HW:

Either you have something forcing the Tx output on the board or you are not probing the right pin or you have something wrong on the oscilloscope: probe issue, config issue etc ..

So what I suggest at this stage is to try to toggle the pin PA12 (FDCAN_Tx) and check with the oscilloscope if it's toggling well ..

Hope it helps.

 

 

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.