cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F072 CAN bus issue

Hugo Lin
Associate II
Posted on May 03, 2017 at 04:59

Dear all,

I using CubeMx(F0_V1.7.0) to generate code for STM32F072.  My pin definition are PB8(CAN_Rx) / PB9(CAN_Tx) when i use loopback mode that CAN Tx has signal out,  but i use normal mode that CAN Tx has no signal out. 

BTW, when normal mode that CAN transmit has not success, code will be hang-up here:

if (HAL_CAN_Transmit(&hcan, 10) != HAL_OK)

{

/* Transmition Error */

Error_Handler();

}

Thanks a lot.

3 REPLIES 3
Posted on May 03, 2017 at 05:19

You will need a bus transceiver, and it will need a responding device on the bus to acknowledge the message being sent

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on May 03, 2017 at 05:27

May i short CAN Tx & Rx for self test?

Posted on May 03, 2017 at 12:31

Hi Clive,  

You are right, the CAN bus is work when i connected transceiver & responding device.

Thanks a lot!