CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
main.c File Reference

: Main program body More...

Include dependency graph for main.c:

Macros

#define TASK_MINIMUM_STACK_SIZE_BYTES   1024
 

Functions

void SystemClock_Config (void)
 System Clock Configuration.
 
static void MX_GPIO_Init (void)
 GPIO Initialization Function.
 
static void MX_DMA_Init (void)
 
static void MX_I2C1_Init (void)
 I2C1 Initialization Function.
 
static void MX_I2C2_Init (void)
 I2C2 Initialization Function.
 
static void MX_I2C4_Init (void)
 I2C4 Initialization Function.
 
static void MX_LPUART1_UART_Init (void)
 LPUART1 Initialization Function.
 
static void MX_UART4_Init (void)
 UART4 Initialization Function.
 
static void MX_UART5_Init (void)
 UART5 Initialization Function.
 
static void MX_USART1_UART_Init (void)
 USART1 Initialization Function.
 
static void MX_USART3_UART_Init (void)
 USART3 Initialization Function.
 
static void MX_SPI1_Init (void)
 SPI1 Initialization Function.
 
static void MX_I2C3_Init (void)
 I2C3 Initialization Function.
 
static void MX_TIM16_Init (void)
 TIM16 Initialization Function.
 
static void MX_IWDG_Init (void)
 IWDG Initialization Function.
 
static void MX_USART2_UART_Init (void)
 USART2 Initialization Function.
 
static void MX_ADC1_Init (void)
 ADC1 Initialization Function.
 
void StartDefaultTask (void *argument)
 Function implementing the defaultTask thread.
 
int main (void)
 The application entry point.
 
void HAL_TIM_PeriodElapsedCallback (TIM_HandleTypeDef *htim)
 Period elapsed callback in non blocking mode.
 
void Error_Handler (void)
 This function is executed in case of error occurrence.
 

Variables

ADC_HandleTypeDef hadc1
 
I2C_HandleTypeDef hi2c1
 
I2C_HandleTypeDef hi2c2
 
I2C_HandleTypeDef hi2c3
 
I2C_HandleTypeDef hi2c4
 
IWDG_HandleTypeDef hiwdg
 
UART_HandleTypeDef hlpuart1
 
UART_HandleTypeDef huart4
 
UART_HandleTypeDef huart5
 
UART_HandleTypeDef huart1
 
UART_HandleTypeDef huart2
 
UART_HandleTypeDef huart3
 
DMA_HandleTypeDef hdma_uart4_rx
 
DMA_HandleTypeDef hdma_usart1_rx
 
SPI_HandleTypeDef hspi1
 
TIM_HandleTypeDef htim16
 
osThreadId_t defaultTaskHandle
 
const osThreadAttr_t defaultTask_attributes
 
osThreadId_t TASK_DEBUG_print_heartbeat_Handle
 
const osThreadAttr_t TASK_DEBUG_print_heartbeat_Attributes
 
osThreadId_t TASK_handle_uart_telecommands_Handle
 
const osThreadAttr_t TASK_handle_uart_telecommands_Attributes
 
osThreadId_t TASK_handle_ax100_kiss_telecommands_Handle
 
const osThreadAttr_t TASK_handle_ax100_kiss_telecommands_Attributes
 
osThreadId_t TASK_bulk_downlink_Handle
 
const osThreadAttr_t TASK_bulk_downlink_Attributes
 
osThreadId_t TASK_execute_telecommands_Handle
 
const osThreadAttr_t TASK_execute_telecommands_Attributes
 
osThreadId_t TASK_service_eps_watchdog_Handle
 
const osThreadAttr_t TASK_service_eps_watchdog_Attributes
 
osThreadId_t TASK_bootup_operation_fsm_Handle
 
const osThreadAttr_t TASK_bootup_operation_fsm_Attributes
 
osThreadId_t TASK_service_write_mpi_data_Handle
 
const osThreadAttr_t TASK_service_write_mpi_data_Attributes
 
osThreadId_t TASK_time_sync_Handle
 
const osThreadAttr_t TASK_time_sync_Attributes
 
osThreadId_t TASK_monitor_freertos_memory_Handle
 
const osThreadAttr_t TASK_monitor_freertos_memory_Attributes
 
osThreadId_t TASK_background_upkeep_Handle
 
const osThreadAttr_t TASK_background_upkeep_Attributes
 
FREERTOS_task_info_struct_t FREERTOS_task_handles_array []
 
const uint32_t FREERTOS_task_handles_array_size = sizeof(FREERTOS_task_handles_array) / sizeof(FREERTOS_task_info_struct_t)
 

Detailed Description

: Main program body

Attention

Copyright (c) 2024 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Macro Definition Documentation

◆ TASK_MINIMUM_STACK_SIZE_BYTES

#define TASK_MINIMUM_STACK_SIZE_BYTES   1024

Function Documentation

◆ Error_Handler()

void Error_Handler ( void )

This function is executed in case of error occurrence.

Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HAL_TIM_PeriodElapsedCallback()

void HAL_TIM_PeriodElapsedCallback ( TIM_HandleTypeDef * htim)

Period elapsed callback in non blocking mode.

Note
This function is called when TIM1 interrupt took place, inside HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment a global variable "uwTick" used as application time base.
Parameters
htim: TIM handle
Return values
None

◆ main()

int main ( void )

The application entry point.

Return values
int
Here is the call graph for this function:

◆ MX_ADC1_Init()

static void MX_ADC1_Init ( void )
static

ADC1 Initialization Function.

Parameters
None
Return values
None

Common config

Configure Regular Channel

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_DMA_Init()

static void MX_DMA_Init ( void )
static

Enable DMA controller clock

Here is the caller graph for this function:

◆ MX_GPIO_Init()

static void MX_GPIO_Init ( void )
static

GPIO Initialization Function.

Parameters
None
Return values
None
Here is the caller graph for this function:

◆ MX_I2C1_Init()

static void MX_I2C1_Init ( void )
static

I2C1 Initialization Function.

Parameters
None
Return values
None

Configure Analogue filter

Configure Digital filter

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_I2C2_Init()

static void MX_I2C2_Init ( void )
static

I2C2 Initialization Function.

Parameters
None
Return values
None

Configure Analogue filter

Configure Digital filter

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_I2C3_Init()

static void MX_I2C3_Init ( void )
static

I2C3 Initialization Function.

Parameters
None
Return values
None

Configure Analogue filter

Configure Digital filter

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_I2C4_Init()

static void MX_I2C4_Init ( void )
static

I2C4 Initialization Function.

Parameters
None
Return values
None

Configure Analogue filter

Configure Digital filter

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_IWDG_Init()

static void MX_IWDG_Init ( void )
static

IWDG Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_LPUART1_UART_Init()

static void MX_LPUART1_UART_Init ( void )
static

LPUART1 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_SPI1_Init()

static void MX_SPI1_Init ( void )
static

SPI1 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_TIM16_Init()

static void MX_TIM16_Init ( void )
static

TIM16 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_UART4_Init()

static void MX_UART4_Init ( void )
static

UART4 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_UART5_Init()

static void MX_UART5_Init ( void )
static

UART5 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_USART1_UART_Init()

static void MX_USART1_UART_Init ( void )
static

USART1 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_USART2_UART_Init()

static void MX_USART2_UART_Init ( void )
static

USART2 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ MX_USART3_UART_Init()

static void MX_USART3_UART_Init ( void )
static

USART3 Initialization Function.

Parameters
None
Return values
None
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StartDefaultTask()

void StartDefaultTask ( void * argument)

Function implementing the defaultTask thread.

Parameters
argumentNot used
Return values
None
Here is the caller graph for this function:

◆ SystemClock_Config()

void SystemClock_Config ( void )

System Clock Configuration.

Return values
None

Configure the main internal regulator output voltage

Initializes the RCC Oscillators according to the specified parameters in the RCC_OscInitTypeDef structure.

Initializes the CPU, AHB and APB buses clocks

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ defaultTask_attributes

const osThreadAttr_t defaultTask_attributes
Initial value:
= {
.name = "defaultTask",
.stack_size = 128 * 4,
.priority = (osPriority_t) osPriorityNormal,
}

◆ defaultTaskHandle

osThreadId_t defaultTaskHandle

◆ FREERTOS_task_handles_array

FREERTOS_task_info_struct_t FREERTOS_task_handles_array[]

◆ FREERTOS_task_handles_array_size

const uint32_t FREERTOS_task_handles_array_size = sizeof(FREERTOS_task_handles_array) / sizeof(FREERTOS_task_info_struct_t)

◆ hadc1

ADC_HandleTypeDef hadc1

◆ hdma_uart4_rx

DMA_HandleTypeDef hdma_uart4_rx

◆ hdma_usart1_rx

DMA_HandleTypeDef hdma_usart1_rx

◆ hi2c1

I2C_HandleTypeDef hi2c1

◆ hi2c2

I2C_HandleTypeDef hi2c2

◆ hi2c3

I2C_HandleTypeDef hi2c3

◆ hi2c4

I2C_HandleTypeDef hi2c4

◆ hiwdg

IWDG_HandleTypeDef hiwdg

◆ hlpuart1

UART_HandleTypeDef hlpuart1

◆ hspi1

SPI_HandleTypeDef hspi1

◆ htim16

TIM_HandleTypeDef htim16

◆ huart1

UART_HandleTypeDef huart1

◆ huart2

UART_HandleTypeDef huart2

◆ huart3

UART_HandleTypeDef huart3

◆ huart4

UART_HandleTypeDef huart4

◆ huart5

UART_HandleTypeDef huart5

◆ TASK_background_upkeep_Attributes

const osThreadAttr_t TASK_background_upkeep_Attributes
Initial value:
= {
.name = "TASK_background_upkeep",
.stack_size = 4096,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_background_upkeep_Handle

osThreadId_t TASK_background_upkeep_Handle

◆ TASK_bootup_operation_fsm_Attributes

const osThreadAttr_t TASK_bootup_operation_fsm_Attributes
Initial value:
= {
.name = "TASK_bootup_operation_fsm",
.stack_size = 4096,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_bootup_operation_fsm_Handle

osThreadId_t TASK_bootup_operation_fsm_Handle

◆ TASK_bulk_downlink_Attributes

const osThreadAttr_t TASK_bulk_downlink_Attributes
Initial value:
= {
.name = "TASK_bulk_downlink",
.stack_size = 4096,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_bulk_downlink_Handle

osThreadId_t TASK_bulk_downlink_Handle

◆ TASK_DEBUG_print_heartbeat_Attributes

const osThreadAttr_t TASK_DEBUG_print_heartbeat_Attributes
Initial value:
= {
.name = "TASK_DEBUG_print_heartbeat",
.priority = (osPriority_t) osPriorityBelowNormal5,
}
#define TASK_MINIMUM_STACK_SIZE_BYTES
Definition main.c:97

◆ TASK_DEBUG_print_heartbeat_Handle

osThreadId_t TASK_DEBUG_print_heartbeat_Handle

◆ TASK_execute_telecommands_Attributes

const osThreadAttr_t TASK_execute_telecommands_Attributes
Initial value:
= {
.name = "TASK_execute_telecommands",
.stack_size = 8192,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_execute_telecommands_Handle

osThreadId_t TASK_execute_telecommands_Handle

◆ TASK_handle_ax100_kiss_telecommands_Attributes

const osThreadAttr_t TASK_handle_ax100_kiss_telecommands_Attributes
Initial value:
= {
.name = "TASK_handle_ax100_kiss_telecommands",
.stack_size = 8192,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_handle_ax100_kiss_telecommands_Handle

osThreadId_t TASK_handle_ax100_kiss_telecommands_Handle

◆ TASK_handle_uart_telecommands_Attributes

const osThreadAttr_t TASK_handle_uart_telecommands_Attributes
Initial value:
= {
.name = "TASK_handle_uart_telecommands",
.stack_size = 8192,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_handle_uart_telecommands_Handle

osThreadId_t TASK_handle_uart_telecommands_Handle

◆ TASK_monitor_freertos_memory_Attributes

const osThreadAttr_t TASK_monitor_freertos_memory_Attributes
Initial value:
= {
.name = "TASK_monitor_freertos_memory",
.stack_size = 2048,
.priority = (osPriority_t) osPriorityBelowNormal6,
}

◆ TASK_monitor_freertos_memory_Handle

osThreadId_t TASK_monitor_freertos_memory_Handle

◆ TASK_service_eps_watchdog_Attributes

const osThreadAttr_t TASK_service_eps_watchdog_Attributes
Initial value:
= {
.name = "TASK_service_eps_watchdog",
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_service_eps_watchdog_Handle

osThreadId_t TASK_service_eps_watchdog_Handle

◆ TASK_service_write_mpi_data_Attributes

const osThreadAttr_t TASK_service_write_mpi_data_Attributes
Initial value:
= {
.name = "TASK_service_write_mpi_data",
.stack_size = 2048,
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_service_write_mpi_data_Handle

osThreadId_t TASK_service_write_mpi_data_Handle

◆ TASK_time_sync_Attributes

const osThreadAttr_t TASK_time_sync_Attributes
Initial value:
= {
.name = "TASK_time_sync",
.priority = (osPriority_t) osPriorityNormal,
}

◆ TASK_time_sync_Handle

osThreadId_t TASK_time_sync_Handle