Skip to main content
kaveh k
Associate
June 6, 2018
Question

STM32429 CAN bus Transmitt Mailbox not trasnmitting?

  • June 6, 2018
  • 1 reply
  • 2331 views
Posted on June 07, 2018 at 00:42

I'm trying to implement the sample code 

\stm32cube_fw_f4_v1210\STM32Cube_FW_F4_V1.21.0\Projects\STM324x9I_EVAL\Examples\CAN\CAN_Networking\Src

on a STM32F429 Nucleo board. Using CubeMx. Single board for now. No transceiver and the CAN bus Tx & Rx pins not connected to a bus.

I've completed/implemented  steps 1 - 5 of the CAN_Config() found in main.c of the above sample project.

To get started, I wanted to simply just transmit a message once a second and noticed the transmit mailbox gets filled after the third message. Seems like the mailboxes do not get transmitted and therefore after the third time HAL_CAN_AddTxMessage(), the three (3) mailboxes are full and HAL_CAN_AddTxMessage(0 returns an error.

What do I need to do so that the mailbox after HAL_CAN_AddTxMessage() can/will get transmitted and therefore becomes empty and available?

Thanks.

    This topic has been closed for replies.

    1 reply

    Tesla DeLorean
    Guru
    June 7, 2018
    Posted on June 07, 2018 at 02:43

    >>

    No transceiver and the CAN bus Tx & Rx pins not connected to a bus.

    You'd need to use Loop Back mode then.

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    kaveh k
    kaveh kAuthor
    Associate
    June 7, 2018
    Posted on June 07, 2018 at 02:50

    Thanks for your email. Appreciate.

    I had the transceivers connected but with the mode set CAN_MODE_NORMAL, no transmission would happen, basically the 3 mailboxes were getting filled. I removed the transceivers in case it was causing the problem.

    When the mode is set toCAN_MODE_LOOPBACK, all is good.

    Any thoughts or suggestions?

    Thanks in advance.

    kaveh

    Tesla DeLorean
    Guru
    June 7, 2018
    Posted on June 07, 2018 at 03:25

    You would need a second device on the bus to listen and acknowledge the packets

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..