cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX feature request: Is it possible to add HAL_FDCAN_ConfigFilter and HAL_FDCAN_AddMessageToTxFifoQ in CubeMX?

victagayun
Senior III

Hello,

Is it possible to add these in the CubeMX?

1. FDCAN filters, like:

  sFilterConfig.IdType = FDCAN_STANDARD_ID;
  sFilterConfig.FilterIndex = 0;
  sFilterConfig.FilterType = FDCAN_FILTER_DUAL;
  sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO0;
  sFilterConfig.FilterID1 = 0x444;
  sFilterConfig.FilterID2 = 0x555;
  if (HAL_FDCAN_ConfigFilter(&hfdcan2, &sFilterConfig) != HAL_OK)
  {
    Error_Handler();
  }

and similar to ADC conversion, you can specify the number of filters

0693W00000bhLaEQAU.png 

2. Transmit messages, like:

  TxHeader.Identifier = 0x444;
  TxHeader.IdType = FDCAN_STANDARD_ID;
  TxHeader.TxFrameType = FDCAN_DATA_FRAME;
  TxHeader.DataLength = FDCAN_DLC_BYTES_12;
  TxHeader.ErrorStateIndicator = FDCAN_ESI_ACTIVE;
  TxHeader.BitRateSwitch = FDCAN_BRS_ON;
  TxHeader.FDFormat = FDCAN_FD_CAN;
  TxHeader.TxEventFifoControl = FDCAN_STORE_TX_EVENTS;
  TxHeader.MessageMarker = 0x52;
  if (HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan2, &TxHeader, TxData0) != HAL_OK)
  {
    Error_Handler();
  }

also, the number of messages as previously shown.

One more thing, if you can specify the pointer of the source of data.

This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Ghofrane GSOURI
ST Employee

Hello @victagayun​ 

First let me thank you for your detailed explanation.

It has been reported to STM32CubeMX development team .

Internal ticket number: 148949 and 149021(This is an internal tracking number and is not accessible or usable by customers).

I will keep you posted with updates.

Thx,

Ghofrane

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.