cancel
Showing results for 
Search instead for 
Did you mean: 

how to send 5 frame in fdcan protocol ?

Ranjeet Singh
Senior

i am able only send 3 frame but i want send 5frame ,what i am doing wrong ?


_legacyfs_online_stmicro_images_0693W00000bjZBCQA2.png
_legacyfs_online_stmicro_images_0693W00000bjZBMQA2.png
_legacyfs_online_stmicro_images_0693W00000bjZBbQAM.png
_legacyfs_online_stmicro_images_0693W00000bjZBqQAM.png 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();}}
_legacyfs_online_stmicro_images_0693W00000bjZC0QAM.png

6 REPLIES 6
Ranjeet Singh
Senior

@KDJEM.1 dear sir kindly help

Ranjeet Singh
Senior

@Community member​  dear sir kindly help me

LCE
Principal

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?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Piranha
Chief II

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.

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.