2023-04-01 08:40 PM
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
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.
2023-04-03 06:24 AM
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