cancel
Showing results for 
Search instead for 
Did you mean: 

CAN bus receive and transmit issues on both buses with STM32F746ZGT6

ARigg
Associate

Hey I was hoping that the STM community could help me with a problem that I have been stuck on while developing a CAN bus application. I have a STM32F746ZGT6 micro controller on a custom PCB with two isolated CAN transceivers, ADM3054. My setup is as follows:

- STM32F746ZGT6 MCU

- Configured with CUBEMx

- Debugged in STM Workbench

- FreeRTOS

- STM HAL driver suite

The problem is that I cannot get both CAN channels working together to pass messages back and forth across two CAN busses operating at 125 KHz. I have confirmed that my transceivers can successfully operate and receive and transmit independently when performing forced, hard coded transmissions, but when I try to apply the system as a CAN bus pass through, things break.

My main suspect for the issue is with CAN transmission, somewhere in between the driver (stm32f7xx_hal_can.c/.h) driver and the transmit lines leading to the ADM3054. Here is my code:0690X000008j4W7QAI.png0690X000008j4W2QAI.png0690X000008j4VxQAI.pngIn the next picture is where the code is getting stuck, the while loop that checks for a free mailbox never exits.0690X000008j4VsQAI.png

This is my Clock Config:

0690X000008j4WCQAY.png

When in debug mode and connected to two active CAN busses, one terminating into CAN 1 and the other into CAN 2, I can confirm that I can receive messages from both busses, but I never see any transmissions. I observe that my CAN threads are getting stuck in the transmit portion of the code while waiting for the CAN mailboxes to free up. I cannot understand why the system is failing to free the mailboxes.

I have read through the reference manual, the data sheet, the programming manual for the MCU, the Errata sheet and the data sheet for the ADM3054 and was unable to find any detailed explanation of the mailboxes, and their behavior on this chipset.

I would really appreciate help solving this issue, or directing me to other resources to figure this out.

Thanks!

Links --------------------------------------------------------------

Errata sheet - https://www.st.com/content/ccc/resource/technical/document/errata_sheet/4d/39/a6/8c/84/47/47/67/DM00145382.pdf/files/DM00145382.pdf/jcr:content/translations/en.DM00145382.pdf

MCU reference Manual - https://www.st.com/content/ccc/resource/technical/document/reference_manual/c5/cf/ef/52/c0/f1/4b/fa/DM00124865.pdf/files/DM00124865.pdf/jcr:content/translations/en.DM00124865.pdf

MCU Programming Manual - https://www.st.com/content/ccc/resource/technical/document/programming_manual/group0/78/47/33/dd/30/37/4c/66/DM00237416/files/DM00237416.pdf/jcr:content/translations/en.DM00237416.pdf

0 REPLIES 0