Hello @Shubh150 ,
Getting back to your request. I did test your project as it is for both devices: H7A3ZI-Q and G474RE on Nucleo boards, attached transceivers (MCP2562FD) for each one and didn't notice any issue. I'm receiving well the data on both nodes (H7A3ZI-Q and G474RE) each time I press the user button.
So I suspect two things:
1- As I said previously: a hardware issue: transceiver not suitable in your application (VIH min for example), transceiver issue (broken), transceiver power supply issue, wiring issue or you didn't use the same GPIOs Tx/Rx pins as configured in the CubeMx. Please read this article.
2- A clock config issue. As NUCLEO-H7A3ZI-Q is having STLINK V3 on it, and as you are using the STLINK MCO with a value of 8MHz I could suspect that this frequency has been modified as the MCO output could be configured (see this article ) .
PS: I don't recommend the usage of not accurate clock source. In your case it's STLINK-MCO: HSI/2 = 16/2 = 8MHz.
So please use one of the HSE/x in the list as described in this article / Section: 2. How to get MCU target HSE fed by STLINK-V3 MCO with an accurate clock source
Hope It does answer your question
To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.