2023-05-06 12:06 AM - edited 2023-11-20 06:16 AM
i am able only send 3 frame but i want send 5frame ,what i am doing wrong ?
if (HAL_FDCAN_Init(&hfdcan2) != HAL_OK)
{Error_Handler();}
FDCAN_FilterTypeDef sFilterConfig;
sFilterConfig.IdType = FDCAN_STANDARD_ID;
sFilterConfig.FilterIndex = 0;
sFilterConfig.FilterType = FDCAN_FILTER_MASK;
sFilterConfig.FilterConfig = FDCAN_FILTER_TO_RXFIFO1;
sFilterConfig.FilterID1 = 0x11;
sFilterConfig.FilterID2 = 0x11;
if (HAL_FDCAN_ConfigFilter(&hfdcan2, &sFilterConfig) != HAL_OK)
{ Error_Handler();}}
2023-05-07 10:39 PM
@KDJEM.1 dear sir kindly help
2023-05-07 10:40 PM
@Community member dear sir kindly help me
2023-05-08 02:49 AM
Your mix of screenshots and code really s*cks...
Anyway...
I guess your TX FIFO queue is filled up and won't empty because the CAN messages you sent are not ACK'd by a receiver.
Have you checked with a scope what's happening on the CAN bus?
2023-05-08 08:14 AM
I'm not a fan of the presentation method. There is a Code Format tools for pasting code, see </> icon, or attach .ZIP file
Not really looking to debug FDCAN code.
Suggest you check FIFO depth, and if the prior messages were sent yet, or if you need to implement a queue and send new packets in the callback.
2023-05-10 03:26 PM
If you make million copies of the same code just because you do not know how to use pointers and structures, it means that you have to learn the basics of software development first. Making complex systems without understanding the basics will never succeed.
2023-05-11 10:49 PM
LCE is correct. You have a 3 message mailbox, without and ACK that buffer stays full. You have 2 choices, purge the mailbox or put the CAN peripheral in Loopback mode.