CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
uart_error_tracking.h File Reference
#include <stdint.h>
#include "stm32l4xx_hal.h"
#include "stm32l4xx_hal_uart.h"
Include dependency graph for uart_error_tracking.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UART_error_counts_single_subsystem_struct_t
 These will be an error defined in the stm32l4xx_hal_uart.h file. More...
 

Macros

#define UART_ERROR_TRACKING_JSON_BUFFER_LEN   768
 

Functions

void UART_track_error_from_isr (USART_TypeDef *huart_instance, uint32_t error_code)
 Track the error for a given UART instance.
 
uint8_t UART_single_subsystem_error_info_to_json (UART_error_counts_single_subsystem_struct_t *error_info_struct, char *json_buffer, uint16_t json_buffer_len)
 
uint8_t UART_get_errors_json (char *json_buf, uint16_t json_buf_len)
 

Variables

UART_error_counts_single_subsystem_struct_t UART_error_mpi_error_info
 
UART_error_counts_single_subsystem_struct_t UART_error_ax100_error_info
 
UART_error_counts_single_subsystem_struct_t UART_error_gnss_error_info
 
UART_error_counts_single_subsystem_struct_t UART_error_camera_error_info
 
UART_error_counts_single_subsystem_struct_t UART_error_eps_error_info
 
UART_error_counts_single_subsystem_struct_t UART_error_telecommand_error_info
 

Macro Definition Documentation

◆ UART_ERROR_TRACKING_JSON_BUFFER_LEN

#define UART_ERROR_TRACKING_JSON_BUFFER_LEN   768

Function Documentation

◆ UART_get_errors_json()

uint8_t UART_get_errors_json ( char * json_buf,
uint16_t json_buf_len )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UART_single_subsystem_error_info_to_json()

uint8_t UART_single_subsystem_error_info_to_json ( UART_error_counts_single_subsystem_struct_t * error_info_struct,
char * json_buffer,
uint16_t json_buffer_len )
Here is the caller graph for this function:

◆ UART_track_error_from_isr()

void UART_track_error_from_isr ( USART_TypeDef * huart_instance,
uint32_t error_code )

Track the error for a given UART instance.

Parameters
huart_instanceThe uart instance we are tracking the error for
error_codeThe error code to track
Note
This function will check if the error code is a known error and increment the corresponding error count
There can't be any Log_message as this will be called in the HAL_UART_ErrorCallback function
Here is the caller graph for this function:

Variable Documentation

◆ UART_error_ax100_error_info

UART_error_counts_single_subsystem_struct_t UART_error_ax100_error_info
extern

◆ UART_error_camera_error_info

UART_error_counts_single_subsystem_struct_t UART_error_camera_error_info
extern

◆ UART_error_eps_error_info

UART_error_counts_single_subsystem_struct_t UART_error_eps_error_info
extern

◆ UART_error_gnss_error_info

UART_error_counts_single_subsystem_struct_t UART_error_gnss_error_info
extern

◆ UART_error_mpi_error_info

UART_error_counts_single_subsystem_struct_t UART_error_mpi_error_info
extern

◆ UART_error_telecommand_error_info

UART_error_counts_single_subsystem_struct_t UART_error_telecommand_error_info
extern