Loading...
Searching...
No Matches
Relevant Code
Relvant Telecommands
CTS1+stm32_internal_flash_set_active_flash_bank
CTS1+stm32_internal_flash_get_active_flash_bank
CTS1+stm32_internal_flash_get_option_bytes
Notes
- You will need the stm32-for-vscode extension (up-to-date version). It is important that it is up to date.
- You will need the
STM32CubeProgrammer
which is downloadable from the stm32 website.
Testing Steps
- Open a serial terminal with the appropriate UART configurations.
Clean Build
the project and Flash
it to your STM32
- Ensure that it is working as normal.
- Open the STM32CubeProgrammer and connect it to you STM32 Microcontroller

- This will cause your STM to pause. Your serial test will not be receiving anything new. (You can reset your STM32 manually by pressing the reset button on the microcontroller to resume it working while still being connected).
- Click the
Upload
button on the left toolbar. It is the second from the top.

- This will show the following screen:

- Underneath the
red
1. drawn, you can select the file path to the firmware .bin file. I would recommend making the following modifications to the firmware.
- Open
rtos_tasks.c
and modify the TASK_DEBUG_print_heartbeat
function.
- In the while loop at the bottom:

- Edit line 68 in the screenshot above so that it says:
FrontierSat version 2 time: ....
. We are only adding the words: version 2
infront of FrontierSat
and not changing anything else.
- Click the
Build
button.
- DO NOT FLASH
- As shown in the above CubeProgrammer screenshot, underneath the
red
1., please enter the path to this .bin file. It should be in the build/debug folder of the firmware project.
- To the left of the
red
2., ensure the value is: 0x8100000
.
- In the checkboxes below the
red
2., please ensure Only theVerify programming
is selected.
- Click the
Start Program
button
- Most likely after completing, your stm will be paused. Press the reset button on your STM32 microcontroller.
- At this point, it should just like before, running the exact same as before. If you followed my recommendation before, you can confirm this as the heartbeat should be saying
FrontierSat time: ...
- We can now jump to the new program by sending the following telecommand:
CTS1+stm32_internal_flash_set_active_flash_bank(2)!
- This enables
BFB2 i.e Boot From Bank 2
which boots from Flash Bank 2.
- Following is an example:

- To go back, we can just send the same telecommand but with 1 as the param:
CTS1+stm32_internal_flash_set_active_flash_bank(1)!