Skip to main content
BViet.1
Associate III
February 2, 2022
Question

STM32F769I-DISCO Using CAN interface over Arduino connector

  • February 2, 2022
  • 7 replies
  • 3194 views

Hi,

I have a problem with CAN peripheral on this board. I tried the CAN Networking Example from the EVAL board and changed the pin configuration to fit to the Arduino connector.

I found some possible pin configurations:

CAN1_RX on PA11 -> D10

CAN1_TX on PA12 -> D13

CAN1_RX on PB8 -> D15

CAN1_TX on PB9 -> D14

I added an external transceiver from Waveshare (https://www.waveshare.net/w/upload/8/82/SN65HVD230.pdf) and tried every possible pin configuration.

The problem is, that there is no signal on the receive pin, so there is no acknowledgement on the physical bus. If I set the CAN peripheral to Loopback mode, then the messages are transmitted, otherweise I will get an error.

The bus termination is correctly set with 2x 120 Ohm resistors on the ends.

The transceiver board is powered from the Arduino connector. I tried 3,3V (because it's a 3,3V transceiver) and 5V (transceiver is 5V tolerant), but there is no difference.

I'm using STM32CubeIDE v1.8.0 and STM32F7 MCU Package v1.16.2 (newest).

Does anyone have such issues with this board or any recommendations to solve this?

This topic has been closed for replies.

7 replies

KnarfB
Super User
February 2, 2022

What CAN node(s) are on the bus? Only the STM32F769I-DISCO?

KnarfB

BViet.1
BViet.1Author
Associate III
February 2, 2022

The board is one node and another one is a PCAN-USB adapter with PCANView software.

mƎALLEm
Technical Moderator
February 3, 2022

Hello,

Did you connect Rs pin of the transceiver to the ground?

Check the power supply of the transceiver directly on pins 2 and 3.

SofLit

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
February 2, 2022

You ever used CAN before?​

Transceiver used lots of places succesfully.

Would check schematic if the pins are conflicted.

Would check code for clocks being enabled, and rates/quanta matching the thing on the bus I'm talking at.

You need other devices on the bus to be responding when addressed..​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
BViet.1
BViet.1Author
Associate III
February 2, 2022

I'm very familar with CAN(FD) communication, but not with the STM32F769.

I implemented CAN-FD communication on an STM32H745 dual core and this works very well.

As i told the transmission works in Loopback mode, so I receive messages if the CAN TX pin is internal looped back to RX pin.

Also the transmission from PCAN to the board is not working. Because of this I think there is a problem on the board side.

Tesla DeLorean
Guru
February 2, 2022

Check the schematics and solder bridges, etc. PA11/PA12 sound like USB pins..

Check pins as GPIO toggling high/low.

Sorry don't know your history, first post..​

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
BViet.1
BViet.1Author
Associate III
February 2, 2022

Yes it's my first post with this account. Have a new job, so my old account is not working anymore ;)

GPIO read and write on these pins are working as expected. I measured the output voltage levels with an oscilloscope and debugged the input levels during pin reading.

I've added a picture of the Arduino connector and the pinout of MCU.

0693W00000JOFbkQAH.png 0693W00000JOFd7QAH.png0693W00000JOFhTQAX.png

KnarfB
Super User
February 2, 2022

If you set CAN to normal mode, remove the transceiver, connect rx and tx with a wire, do you receive sent messages?

BViet.1
BViet.1Author
Associate III
February 2, 2022

No I just see an ACK error.

BViet.1
BViet.1Author
Associate III
February 3, 2022

Hey guys, thanks a lot for your ideas!

I found another transceiver and now it works. The IC on the transceiver board from Waveshare has some issues, it's not working. Now I'm using a mikroBus extension board with an ATA6563 transceiver from Microchip.

So I can say that the pinning is correct, if anyone has some issues with this board.

mƎALLEm
Technical Moderator
February 8, 2022

Hello,

It seems the module featuring SN65HVD230 transceiver has issues. @Community member​  faced the same issue: https://community.st.com/s/question/0D73W000001NZuxSAG/detail?s1oid=00Db0000000YtG6&t=1644309277909&s1nid=0DB0X000000DYbd&emkind=chatterCommentNotification&s1uid=0050X000007vx9R&emtm=1644304106271&fromEmail=1&s1ext=0

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.