2024-10-29 10:48 PM - last edited on 2024-11-04 06:22 AM by SofLit
Hi STM Expert,
This query is a continuation of the below ticket
Right now, we are testing the normal mode scenario where we have taken two STM32G491KCU6 MCUs and considered one as the Transmitter and one as the Receiver.
Attaching the sample code we used for transmitting part and receiving part.
Since we only have one STMLink, we cannot run both MCUs in debug mode. So the transmitter MCU is simply booted up and receiver end we are planning to run in debug mode so that we expect the Rx buffer to get filled and observe the same in Live Expressions tab.
Please let us know if this method is correct?
Solved! Go to Solution.
2024-11-04 04:04 AM
Adding a new observation.
Once we run the application in Rx side, the activity in Tx side got lost (on probing on MCU1 Tx pin).
This might be the reason the callback is not getting called and RxData is not reading anything.
Can you give us a hint on why the activity on MCU1 Tx pin is lost when MCU2 starts to receive?
2024-11-04 06:04 AM
@ssuresh wrote:
Then executed the application in Rx side (not in step by step mode, as per your suggestion). In the Live expressions, got an error for RxData side as shown below
Thus it seems like there is no data coming to the RxData buffer which is why it is throwing the error "failed to evaluate expression". Cannot understand why the callback function is not invoked in Rx side.
Is it related to the sample code we use?
This is not related to CAN but to CubeIDE. Did you declare RxData global?
2024-11-04 09:25 PM
Hi Expert,
Yes RxData is declared globally.
I have shared the sample code we used for Rx and Tx.
2024-11-05 12:52 AM - edited 2024-11-05 12:53 AM
Hello,
Please share your complete project (including ioc file) in rar or zip file so I could at it and make a rework if needed. I will attach it later and tell you how to do. So we need to converge on this case and reduce the ping pong.
Thank you.
2024-11-05 01:28 AM
2024-11-05 03:01 AM - edited 2024-11-05 03:03 AM
Hello,
I double checked your Rx project and you didn't activate the Rx interrupt, that's why you can't see RxData in Live watch.
I also modified the filter configs. This is the live Expression on Rx side running on two G491 NUCLEO boards. As you can see, the data are updated continuously with the sent data from Tx project.
I'm attaching the reworked Rx project.
I'm closing this thread as the question is solved.
For any new question please open a new thread.