Skip to main content
Visitor II
April 17, 2020
Question

STLinkV3 + Stm32CubeProgrammer = Bridge Error (CAN Bootload)

  • April 17, 2020
  • 4 replies
  • 6580 views

Getting a "Error: Bridge error (BRG_CAN_ERR)". Can't find any documentation about it.

The StmLinkV3 is able to program the Nucleo (Stm32H743) via SWD fine.

In the screenshot's log section, the first message shows that the StLink doesn't detect the target's vcc.. so I had to connect the SWD cable between them, which kind of defeats the whole purpose of the CAN bootloading.. however even after it detects the target vcc, it fails to connect due to the BRG CAN ERR. I've tried all the different baud rates with no luck.

I have the Nucleo in bootloader mode (BOOT0=3.3V), with the STLink can bus (CN9 Pins 8/9) directly to the Nucleo's Can lines (CN9.25/27), crossing RX/TX.. although I've tried both ways. Actually, I get the error message even without connecting the TTL can lines to the target.

I'm using Stm32Cube v2.4 with an StLinkV3 MB1440B (firmware V3J5M1B3).

0693W000000VycvQAC.png

    This topic has been closed for replies.

    4 replies

    Visitor II
    April 17, 2020

    Hi EZamo.1,

    According to the STM32H742, STM32H743/753 and STM32H750 Value line advanced Arm®-based 32-bit MCUs Reference Manual:

    The embedded bootloader code is located in system memory. It is programmed by ST during production. It is used to reprogram the Flash memory using one of the following serial interfaces:

    • USART1 on PA9/PA10 and PB14/PB15 pins, USART2 on PA3/PA2 pins, and USART3 on PB10/PB11 pins.

    • I2C1 on PB6/PB9 pins, I2C2 on PF0/PF1 pins, and I2C3 on PA8/PC9 pins.

    • USB OTG FS in Device mode (DFU) on PA11/PA12 pins

    • SPI1 on PA4/PA5/PA6/PA7 pins, SPI2 on PI0/PI1/PI2/PI3 pins, SPI3 on PC10/PC11/PC12/PA15 pins, and SPI4 on PE11/PE12/PE13/PE14 pins.

    Iam afraid that you cannot do this with CAN protocol.

    Best Regards,

    Ons.

    EZamo.1Author
    Visitor II
    April 17, 2020

    The Reference Manual doesn't list it, but it does refer the reader to AN2606.. and in that document, it shows CAN bus is a supported bootloader for the STM32H74xxx/75xxx

    0693W000000Vyi0QAC.png

    Also, the StLink reports that error with or without connecting it to the target device. Is that normal?

    EZamo.1Author
    Visitor II
    April 30, 2020

    Testing with an STM32H745I-DISCO board, it can be placed in bootloader mode and programmed via UART.

    Trying to bootload via CAN bus using an St-Link-V3 (MB1440B firmware V3J5M1B3) has problems.

    The St-Link-V3 has the JP7 (CAN_ON) jumper installed, its CN5's CAN_TX and CAN_RX pins are connected to an external transceiver (SN65HVD230). The transceivers H/L bus is connected to the STM32H745I-DISCO's CN11 Pins 1&2. The ST-Link V3 "CAN_VCC" is tied to VCC with the GND common to the DISCO, TRANSCEIVER and ST-LINK.

    Stm32CubeProgrammer (v2.4) shows it has an error connecting to the DISCO via CAN bus. The GUI also reports 0v for the Target VCC, presumably because the interface is not SWD? In any case, I tried connecting the ST-Link V3's "T-VCC" to CAN_VCC but it did not make a difference.

    How can we use ST-Link V3 to bootload via CAN bus the STM32H745I-DISCO?

    Visitor II
    May 5, 2020

    Hello,

    I have the identical problem on STM32F105. Have tried with STLinkV3SET and STLinkV3MODs: both treat identically.

    Could be a software error. No response from ST yet. I'm waiting.

    EZamo.1Author
    Visitor II
    May 7, 2020

    Unless it's a silicon rev issue, it's hard to imagine that the rom's CAN bootloader in the chip doesn't work.. I'm guessing an issue with the ST-link. But can't find any documentation on the CAN bootloading protocol.. or the St-Linkv3 schematics/source/error messages ("CAN_BRG").. so who knows.

    But as a test, I tried sending the chip: 0x79 id (no data bytes) at a 500khz bit rate, from a Peak-USB device (instead of from the stlink) but like St support.. no response.

    I also tried checking the st-linkv3 can_tx/can_rx pins, without anything physically connected to them. Interestingly, I see some activity on BOTH. Although, maybe the can_rx is just coupling from the can_tx.

    Visitor II
    May 13, 2020

    Have tested STLinkV3 with STM32F407-Discovery Board: same poor effect! CAN boot with XMC4500 was sucessful but MCU is too expensive. Perhaps Aurix might be of interest for you :) (see attachments).