CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
stm32_internal_flash_telecommand_defs.h File Reference
Include dependency graph for stm32_internal_flash_telecommand_defs.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint8_t TCMDEXEC_stm32_internal_flash_write (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Write data to the internal flash bank starting from address 0x08100000.
 
uint8_t TCMDEXEC_stm32_internal_flash_read (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Read data from the internal flash bank.
 
uint8_t TCMDEXEC_stm32_internal_flash_erase (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Erase a range of pages in the internal flash bank. Only Erases for Flash Bank 2.
 
uint8_t TCMDEXEC_stm32_internal_flash_get_option_bytes (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Get the option bytes configuration from the stm32 internal flash memory.
 
uint8_t TCMDEXEC_stm32_internal_flash_set_active_flash_bank (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Given a 1 or 2, switches to the respective flash bank and runs the application stored there if present. Mostly useful for switching between 2 different version of the firmware (1 will be stored in Flash Bank 1, other will be stored in Flash Bank 2)
 
uint8_t TCMDEXEC_stm32_internal_flash_get_active_flash_bank (const char *args_str, char *response_output_buf, uint16_t response_output_buf_len)
 Prints the active flash bank where the firmware boots from.
 

Function Documentation

◆ TCMDEXEC_stm32_internal_flash_erase()

uint8_t TCMDEXEC_stm32_internal_flash_erase ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Erase a range of pages in the internal flash bank. Only Erases for Flash Bank 2.

Parameters
args_str
  • Arg 0: The starting page to erase as a uint64_t
  • Arg 1: The number of pages to erase as a uint64_t
Here is the call graph for this function:

◆ TCMDEXEC_stm32_internal_flash_get_active_flash_bank()

uint8_t TCMDEXEC_stm32_internal_flash_get_active_flash_bank ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Prints the active flash bank where the firmware boots from.

Parameters
response_output_bufPrints the active bank
Here is the call graph for this function:

◆ TCMDEXEC_stm32_internal_flash_get_option_bytes()

uint8_t TCMDEXEC_stm32_internal_flash_get_option_bytes ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Get the option bytes configuration from the stm32 internal flash memory.

Parameters
args_strNo args
Returns
0 on success, > 0 on error
Here is the call graph for this function:

◆ TCMDEXEC_stm32_internal_flash_read()

uint8_t TCMDEXEC_stm32_internal_flash_read ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Read data from the internal flash bank.

Parameters
args_str
  • Arg 0: The address to start reading from
  • Arg 1: The number of bytes to read as a uint64_t
Here is the call graph for this function:

◆ TCMDEXEC_stm32_internal_flash_set_active_flash_bank()

uint8_t TCMDEXEC_stm32_internal_flash_set_active_flash_bank ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Given a 1 or 2, switches to the respective flash bank and runs the application stored there if present. Mostly useful for switching between 2 different version of the firmware (1 will be stored in Flash Bank 1, other will be stored in Flash Bank 2)

Parameters
args_str
  • Arg 0: A 1 or 2. 1 to switch to the application present in Flash Bank 1, 2 to switch to the application present in Flash Bank 2
response_output_bufPrints error if it occurs
Returns
0 on success, > 0 otherwise
Here is the call graph for this function:

◆ TCMDEXEC_stm32_internal_flash_write()

uint8_t TCMDEXEC_stm32_internal_flash_write ( const char * args_str,
char * response_output_buf,
uint16_t response_output_buf_len )

Write data to the internal flash bank starting from address 0x08100000.

Parameters
args_str
  • Arg 0: The data in hex format to write
  • Arg 1: The offset to start writing from
Note
This telecommand is only for testing purposes, it is purposfully not fully fleshed out as there is no intention on using this. Update as needed
Here is the call graph for this function: