cancel
Showing results for 
Search instead for 
Did you mean: 

STM32429 CAN bus Transmitt Mailbox not trasnmitting?

kaveh k
Associate II
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.

5 REPLIES 5
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 Venmo Up vote any posts that you find helpful, it shows what's working..
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

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 Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on June 07, 2018 at 03:41

Thanks. Appreciate your reply.

I did not do a good job detailing my setup. I do Apologize.

I had/have the CAN Master connected to the CAN Slave on my Nucleo board and configured/setup both ports. No transmission or any of the 3 mailboxes getting empty. Then I started to remove the hardware till I got to the point I needed help and created/posted my help request.

In theory, should the above Master Salve CAN bus network work? Any suggestions/thoughts?

Thanks in advance.

kaveh

Posted on June 07, 2018 at 04:06

Several years back I demonstrated CAN1 to CAN2 connectivity, the signals routed on/off the bus via transceivers, and the data was pulled off the bus at one end as the FIFO dispatched it to the other.

 

One could likely port similar functionality to a HAL implementation.

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