2025-04-17 5:43 AM
Hi all,
I'm struggling to get the ST bootloader on a STM32L431KUB to communicate with a STLINK-V3SET via CANBUS using the STM32CubeProgrammer, the reported error is ST-LINK error (BRG_CAN_ERR) Establishing connection with the device failed.
I have made an adapter board with a MCP2551 transceiver which is connected via flying leads on CN9 of the STLINK-V3SET. I can connect a CANBUS analyzer to the output of this and see that the STLINK is sending messages to id 0x79, so I am confident this is working as expected.
My target is a custom PCB with an 8Mhz external clock and a TCAN322 CANBUS transceiver, which functions correctly when I load my application software through the SWD interface. I can also see that the uC is going into the bootloader when the BOOT0 pin is pulled high or the device memory is blank, by using the SWD interface and checking the program counter is in the 0x1FFFXXXX range. However despite seeing the expected messages on the CANBUS and seeing activity on the RX pin on the uC I never get any TX response.
I have noticed that in AN2606 it states that the CAN1 interface is supported by the bootloader although it lists pins PB8 and PB9 for RX/TX which the STM32L431 doesn't have. Does this mean that bootloading via CANBUS isn't available on this device?
Solved! Go to Solution.
2025-04-17 6:00 AM - edited 2025-04-17 6:00 AM
> I have noticed that in AN2606 it states that the CAN1 interface is supported by the bootloader although it lists pins PB8 and PB9 for RX/TX which the STM32L431 doesn't have. Does this mean that bootloading via CANBUS isn't available on this device?
Yes. Only the pins listed in AN2606 are supported, unfortunately.
2025-04-17 6:00 AM - edited 2025-04-17 6:00 AM
> I have noticed that in AN2606 it states that the CAN1 interface is supported by the bootloader although it lists pins PB8 and PB9 for RX/TX which the STM32L431 doesn't have. Does this mean that bootloading via CANBUS isn't available on this device?
Yes. Only the pins listed in AN2606 are supported, unfortunately.