2024-10-21 12:11 AM - last edited on 2024-10-21 01:04 AM by SofLit
Hi STM Expert,
We are currently working on STM32G491KCU6 MCU FDCAN side. Our requirement is to validate the activity on Tx and Rx pins.
We started off the testing with the LoopBack mechanism but unfortunately we were not able to see any data received in the Rx buffer. We referred sample FDCAN programs for this and tested the same in STM IDE Debugger mode.
We then moved to test the normal mode as well. For this we used a sample code and probed the Tx pin of FDCAN using an oscilloscope. During the transmission, no activity is seen on the oscilloscope.
We confirmed the pins are not damaged by setting FDCAN_Tx and FDCAN_Rx pins to GPIO and toggled it.
Please let us know what we have missed and guide us.
Solved! Go to Solution.
2024-10-21 05:50 AM
Just one thing to test: are you sure the GPIO pin PB6 is OK? could you please toggle it and check?
2024-10-21 09:43 PM
Hi STM Expert,
Yes we tried this.
Made both PB6 and PB5 as GPIOs and tried toggling it. It worked fine.
2024-10-21 11:08 PM
Sure, awaiting your response.
2024-10-22 05:42 AM
Hi Expert,
please set PB6 IO to High instead of Low ---> By this, did you mean to PULL UP the pin from hardware?
2024-10-22 09:51 AM - edited 2024-10-22 09:55 AM
Hello,
I tested your project and I probed CAN frames on Tx without any issue and the Rx callback is also triggering.
This is a screenshot of CAN frame on PB6:
Attached the project that I tested on NUCLEO-G491RE board.
So I suspect something wrong on PB6 on you board: either something forcing the pin level voltage or you are not probing the right pin!
Hope it helps.
2024-10-22 10:00 PM
Hi STM Expert,
Thanks for the update.
Can you please let me know the hardware setup used while testing?
Also, let me know the response on below queries:
1. whether PB6 pin was PULLED UP from hardware or software?
2. whether CAN transceiver was connected while testing?
2024-10-22 10:39 PM
Adding one more query,
3. Was FDCAN_TX and FDCAN_RX shorted while testing?
2024-10-23 02:03 AM
Hello,
Can you please let me know the hardware setup used while testing?
-> Already said in my previous comment: "Attached the project that I tested on NUCLEO-G491RE board."
1. whether PB6 pin was PULLED UP from hardware or software?
-> There is no need to put a pull- up/down resistors for FDCAN in loopback mode. Please refer to the project I attached.
2. whether CAN transceiver was connected while testing?
-> No transceiver needed in Loopback mode. So I didn't connect any transceiver during the test.
3. Was FDCAN_TX and FDCAN_RX shorted while testing?
-> No. The connection is done internally by hardware when configuring it in loopback mode. Please refer to the reference manual of the product:
2024-10-23 04:44 AM
Hi Expert,
Can you please send us the screenshot of clock configuration settings used?
2024-10-23 04:50 AM
Hello,
I've already attached the all project in a previous comment including the ioc file:
So you can download it.