2018-06-06 03:42 PM
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.
2018-06-06 05:43 PM
>>
No transceiver and the CAN bus Tx & Rx pins not connected to a bus.
You'd need to use Loop Back mode then.
2018-06-06 07:50 PM
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
2018-06-06 08:25 PM
You would need a second device on the bus to listen and acknowledge the packets
2018-06-06 08:41 PM
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
2018-06-06 09:06 PM
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.