FDCAN Tx

FDCAN Tx block

This block implements receiving data by FDCAN interface on STM microcontrollers.

Contents

FDCAN Transmit block display

Block parameters

  • Module number – number of CAN module used in model
  • Frame format – set classical CAN frame format or FDCAN frame format
  • Add message to – store the message to specified Tx Buffer or Tx FIFO
  • Enable input ID – enable/disable input ID
  • ID message – set ID of the message
  • Data length – length of data to receive (max 8 bytes for classical CAN and max 64 bytes for FD CAN)
  • Frame repeat – send the message x times
  • Sample time – period of function refreshing (-1 means that a particular block takes sample time from its input block or if it doesn’t have any input block it takes the fastest sample time in a model)

Explain output „Status”

  • Status „0” – transmiting the message has error
  • Status „1” – the message has been sent correctly

CubeMX settings STM32H7 for CAN classic frame

  • In Pinout card set FDCANx mode at Classic
  • In Parameter Settings set Mode as Normal mode
  • In Parameter Settings set Auto Retransmission as Enable in Parametrr Settings
  • In Parameter Settings set Prescaler, Sync Jump Widtht, Time Seg1 and Seg2 to set the data transmission speed (use webside http://www.bittiming.can-wiki.info/)
  • In Parameter Settings set Std Filters Nbr as 128
  • In Parameter Settings set Rx Fifo0 Elmts Nbr as 64
  • In Parameter Settings set Rx Fifo0 Elmt Size as 8 byts data field
  • In Parameter Settings set Rx Fifo1 Elmts Nbr as 64
  • In Parameter Settings set Rx Fifo1 Elmt Size as 8 byts data field
  • In Parameter Settings set Tx Buffers Nbr as 32
  • In Parameter Settings set Tx Fifo Queue Elmts Nbr as at least 100
  • In Parameter Settings set Tx Fifo Queue Mode as FIFO mode
  • In Parameter Settings set Tx Elmt Size as Enable
  • In Parameter Settings set Auto Retransmission as 8 byts data field
  • In NVIC Settings set FDCANx interrupt 0 and 1 as Enabled