2025-01-19 11:19 AM - last edited on 2025-01-20 12:41 AM by SofLit
Hi, i can definitely use a push in the right direction as i am really stuck on this one.
Goal is to push new firmware onto a STM32F446 via the built-in bootloader. For this i have connected two MCU's on a CAN bus, the receiving one is a STM32F446. I use CAN2 (see an2606 table 80) pin PB5 as RX and PB13 as TX. Strange combination by the way. One if default and one is the alternate pin. Anyway..
Baudrate is set to 125kHz on both MCU's. I reset the STM32F446 with BOOT0 high so i get into the bootloader.
On the sending side, i send out a can message with id 0x79 with one byte data, a 0x00. (documention states it does not matter what you send, so i thought to do one byte with just a zero)
This should trigger a response from the bootloader with a ACK, but it does not. I get nothing. What i see is that the target reboots after this message. I suspect becuase of a timeout or other error or so. It happens fast, so timeout is probably in a few ms or so.
I have tried different id's (0x7E0 for example) and different payloads (0x02, 0xfd) to trigger a get-chip-id. No joy.
Any idea's?
2025-01-20 12:51 PM - edited 2025-01-20 01:13 PM
Solid point. I did not look at that enough i guess. Thanks!
I will order a new pcb tomorrow morning with an external oscillator on it. Will take a week or so before i can commence my testing.
Just thinking out loud; while waiting for the new board. Could i configure the CAN periferal in normal code, and then jump to an address inside the bootloader just after where it initialises and configures the CAN interface. In theory, i should be able to test the protocol, right? Just have no idea where to jump to actually.. probably not a documented address.
Cheers, to be continued...
PS by the way, i there some documentation of how the can pins should be wired in a typical situation? Reason why i ask is because PB5/PB13 is not a normal CAN pin combination. PB5 is part of an alternate config, while PB13 is part of the standard config.
2025-01-20 01:41 PM
https://www.st.com/en/microcontrollers-microprocessors/stm32f446/documentation.html
You have time to study the documentation while you receive the new board.))
2025-01-20 01:46 PM
AF9 )