2024-08-05 04:45 PM - edited 2024-08-06 11:21 AM
Hello, I've been trying to port over ST OpenBootloader for use with an STM32L431KBUx over CAN. I specifically want to use CAN pins PA11 and PA10 as those are what are available in the package I chose.
As I am porting over the ST Openbootloader code found here: https://github.com/STMicroelectronics/stm32-mw-openbl
I noticed a few strange things:
1. there is no can_interface file set so I had to write my own
2. the project calls for app_openbootloader file set but those do not exist in the project so I grabbed it from an example project.
I am also following this application note: https://www.st.com/resource/en/application_note/cd00264321-can-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf
Anyway, I got past these issues no problem.
The issue I am running into now is when I try to connect my STLink V3SET to the STM32L431 over CAN using STM32CUBEProgrammer. When I hit connect, the program sends over CAN STD ID 0x79 with no data. My code will send back the STD ID (0x79) with a NACK(0x1F) indicating that the command doesn't exist. STM32CubeProgrammer then gives me a BRG_BL_NACK_ERR and I am unable to continue.
After looking at the documentation, code, and example code, I am unable to find the opcode/command 0x79 anywhere. So, I am confused as to why STM32CUBEProgrammer sends that command. I see that 0x79 is supposed to be an ACK but that is it. It shouldn't be sent as the STD ID/command/opcode. Please let me know what I am missing here.
CAN TX LINE:
I am using a PEAK PCAN to sniff the bus. I am using C_TX(pin 9) and C_RX(pin 8 ) on the stlink v3set to connect to a CAN transceiver (https://www.adafruit.com/product/5708)
UPDATE: I have solved it by sending an ACK when receiving CAN STD ID 0x79
Solved! Go to Solution.
2024-08-06 11:22 AM
I have solved it by sending an ACK when receiving CAN STD ID 0x79
2024-08-06 11:22 AM
I have solved it by sending an ACK when receiving CAN STD ID 0x79