cancel
Showing results for 
Search instead for 
Did you mean: 

I have create a project to communicate via a fdcan bus on stm 32h723zgt microcontroller but i have no interrupt generated

LROCH.11
Associate II

i have connected the tx pin to rx pin on fbcan3 interface

you will find my project in attacheement

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
SofLit
ST Employee

Hello,

Using nucleo-H723ZG board: to use CAN with this board you have either:

- Use FDCAN in loopback mode not in normal mode (which is your current config). The CAN cannot be handled as UART or SPI it has same specificity like arbitration, error management etc.. this arbitration is done when at least two nodes are connected via CAN bus through transceivers (normal mode).

In loopback mode, this arbitration mode is managed internally in the cell. so Rx and Tx pins are connected internally in the chip. refer to RM0468 rev2 page 2524/2524: External and internal loop back modes 

For loopback mode example, please refer to the example provided under: \Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Loopback

- Use FDCAN in normal mode but you have to add an external transceiver to connect your board to another CAN node through CAN bus (differential mode). You can use For example FDCAN2/FDCAN3 in normal mode but you have to add a transceiver for each one.

But at the same time you have to select the correct transceiver: classic mode which reaches 1Mb/s and FDCAN: it depends on what bitrates you will use.

For the clock, for loopback mode you may not encounter communication issues, but in normal mode you will. So for your design you have to an external precise crystal. For example you can use the clock source provided by ST-Link (8MHz) in bypass mode.

STM32

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

7 REPLIES 7
SofLit
ST Employee

Hello,

  • Could you please tell us what is the HW used? is it an ST board (Nucleo/Disco/Eval)? or something custom?
  • What do you mean by "i have connected the tx pin to rx pin on fbcan3 interface", did you connect FDCAN3_Tx to FDCAN3_Rx using a wire?
  • Just to note that it's not recommended to use HSI for CAN communication, please use an external precise crystal with RCC HSE config.

STM32

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.
LROCH.11
Associate II

Hello,

  • I used the nucleo-H723ZG board.
  • Yes, I connected a FDCAN3_Tx and FDCAN3_Rx  with a wire.
  • in my design i used the hsi clock

SofLit
ST Employee

Hello,

Using nucleo-H723ZG board: to use CAN with this board you have either:

- Use FDCAN in loopback mode not in normal mode (which is your current config). The CAN cannot be handled as UART or SPI it has same specificity like arbitration, error management etc.. this arbitration is done when at least two nodes are connected via CAN bus through transceivers (normal mode).

In loopback mode, this arbitration mode is managed internally in the cell. so Rx and Tx pins are connected internally in the chip. refer to RM0468 rev2 page 2524/2524: External and internal loop back modes 

For loopback mode example, please refer to the example provided under: \Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Loopback

- Use FDCAN in normal mode but you have to add an external transceiver to connect your board to another CAN node through CAN bus (differential mode). You can use For example FDCAN2/FDCAN3 in normal mode but you have to add a transceiver for each one.

But at the same time you have to select the correct transceiver: classic mode which reaches 1Mb/s and FDCAN: it depends on what bitrates you will use.

For the clock, for loopback mode you may not encounter communication issues, but in normal mode you will. So for your design you have to an external precise crystal. For example you can use the clock source provided by ST-Link (8MHz) in bypass mode.

STM32

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.
LROCH.11
Associate II

hi,

can i use the interrupt in loopback mode?

SofLit
ST Employee

Hello,

Yes of course, for Tx & Rx.

STM32

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.
LROCH.11
Associate II

hello

i just change in loopback mode in cube mx and i d'nt have any interrupt.

SofLit
ST Employee

Hello,

Please refer to one of the following examples provided in STM32H7Cube which are using Rx interrupts:

\Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Classic_Frame_Networking

\Projects\STM32H743I-EVAL\Examples\FDCAN\FDCAN_Com_IT

The interrupt config is the same either in loopback or normal mode.

STM32

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.