cancel
Showing results for 
Search instead for 
Did you mean: 

Using st link v3 to program over CAN

Eben
Associate

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.

 

 

 

5 REPLIES 5

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 Venmo
Up vote any posts that you find helpful, it shows what's working..

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

 

Amine_Jridi
ST Employee

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.

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

Hello Amie,
Still we're encountering issues for CAN bootloader. After applying RESET to STM chip (STM32L562CE) from ST-Link V3SET board. Now we see BRG_TARGET_CMD_TIMEOUT message on STM32CubeProgrammer. Just in case we've tested CAN bootloader using L452RE evaluation board and ST-Link V3SET, it works fine. So I am wondering if there is no workable CAN bootloader code in ROM of L562CE chip. Or additionally we need to setup STM chip (STM32L562CE) board. We've used pattern 12 for L562xx Bootloader configuration as suggested in AN2606.

seongman_0-1729168594738.png
Thanks,
Seongman