2023-10-11 04:13 AM - edited 2023-10-11 04:14 AM
Hi,
I want to clarify that this is part of an experiment so I know there are easier ways to program these boards.
What I am aiming to do is have a board (Nucleo 144) as a main board, let's call it B1, that I can program using cubeIDE through the USB. Another board (Nucleo 64), B2, is only connected to the main board B1.
The main board B1 will have a command menu where you can select which program to send to the B2.
The idea is that B1 already has the binary data for the B2 programs. I only need to know if it is possible to flash its memory from B1 on demand. What I found about the topic is using the B1 as a programmer changing the jumpers from nucleo to s-link, but if I do this I cannot use the board normally, can I?
I would like to know your opinion on what is the best way to do this scenario.
Thank you in advance!
2023-10-11 06:53 AM
An SWD programmer can only be connected to a single target at a time, so this scheme won't work as written.
You could have B1 flash B2 using B2's system bootloader, which you can enter on demand by controlling BOOT0, NRST, and the supported peripheral. The SPI bootloader is quite fast.
2023-10-11 08:10 AM
Or use UART, see AN2606 and AN3155. See firmware updater example for Arduino MKR WAN1300 board (uses a Murata LoRa module using STM32L072). Pushes firmware in using NRST, BOOT0 and a UART