cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to send or receive CAN message with STM32f767ZI

¦imun ¦estak
Associate
Posted on May 03, 2018 at 14:47

Hello,

I'm working on stm32f767ZI, nucleo 144 board and I have an issue with CAN communication. I'm trying to send a message with  functions HAL_CAN_GetTxMailboxesFreeLevel() and  HAL_CAN_AddTxMessage(). Function returns HAL_OK but message never comes to the CAN bus. Message is pending (check via HAL_CAN_IsTxMessagePending() ), but never transmitted. 

I'm using  TLE7251 CAN transceiver on the Nucleo board side and Vector hardware with Busmaster on the computer side.

Busmasters messages are visible with the oscilloscope on Rx pin on Nucleo board, but when I try to receive message, there are no messages in FIFO0 or FIFO1.

CAN state is listening or ready all the time.

Is there any other function required to send or receive CAN messages?

#stm32f767zi #can-interface
1 REPLY 1
¦imun ¦estak
Associate
Posted on June 08, 2018 at 07:04

It was a hardware issue in the end. CAN interface didn't get enough voltage (3.3V instead of 5V), and, I believe, too low voltage on Rx meant dominantstate, what means busy CAN bus for STM32 board. While busy CAN bus (at least STM32 thought it was busy bus) the STM32 couldn’t transmit any message.

https://community.st.com/collaborations/3502/6735

/external-link.jspa?url=https%3A%2F%2Fphotos.app.goo.gl%2Fx9A6TcNmHwWHuIX12

Here's a little sketch of mine, I believe it is easier to understand what I meant to say