Skip to main content
Associate
June 4, 2024
Question

Using st link v3 to program over CAN

  • June 4, 2024
  • 2 replies
  • 1933 views

Good day,

I am attempting to program an STM32L5 MCU using an ST Link V3 over FDCAN. I am aware that on the breakout board for the ST Link V3 there is connector CN5 which has CAN RX and TX. On the microcontroller I have a CAN transceiver installed on pins PD0 and PD1. I am able to put the microcontroller in the bootloader mode, but when I attempt to connect using the following configuration

Eben_0-1717506462665.png

all I am met with is the error
22:56:39 : Error: ST-LINK error (BRG_CAN_ERR)
22:56:39 : Error: Establishing connection with the device failed

Do I have to use pins PB9 and PB8? If so, do they have to have a CAN transceiver installed on them? Am I doing something wrong in CubeProgrammer? Should I be using a different connector on the ST Link V3? Programming over UART was so easy I did not expect CAN to be anywhere near this difficult. Any assistance would be greatly appreciated as this is somewhat urgent. Thank you.

 

 

 

2 replies

Tesla DeLorean
Guru
June 4, 2024

My expection is that you need a transceiver on the ST-LINK/V3 side also. Or use the diode method at both ends in lieu of the transceivers. 

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
EbenAuthor
Associate
June 5, 2024

Have you gotten this working with pins other than the ones specifically mentioned in the bootloader documentation?

 

Amine_Jridi
Technical Moderator
June 6, 2024

Hello @Eben,

Please check the steps in this article. If you still encounter any issues afterwards, feel free to reach out.

Thanks,

Amine.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Visitor II
October 15, 2024

Thanks for your answer Eben,
We've followed all instructions as you attached above and are able to observe CAN frame signals as below. But still we see BRG_CANERR message on STM32CubeProgrammer. So I am wondering if there is no workable CAN bootloader code in ROM or we need to send rst signal to STM chip (STM32L562) from STM32CubeProgrammer.

seongman_0-1729011328418.png
Thanks,
Seongman