CTS-SAT-1-OBC-Firmware
Loading...
Searching...
No Matches
uart_error_tracking.c File Reference
#include "uart_handler/uart_error_tracking.h"
#include "uart_handler/uart_handler.h"
#include <string.h>
#include <stdio.h>
Include dependency graph for uart_error_tracking.c:

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
 

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
Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
}

◆ UART_error_camera_error_info

UART_error_counts_single_subsystem_struct_t UART_error_camera_error_info
Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
.handler_buffer_full_error_count = 0,
}

◆ UART_error_eps_error_info

Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
.handler_buffer_full_error_count = 0,
}

◆ UART_error_gnss_error_info

UART_error_counts_single_subsystem_struct_t UART_error_gnss_error_info
Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
.handler_buffer_full_error_count = 0,
}

◆ UART_error_mpi_error_info

Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
.handler_buffer_full_error_count = 0,
}

◆ UART_error_telecommand_error_info

UART_error_counts_single_subsystem_struct_t UART_error_telecommand_error_info
Initial value:
= {
.parity_error_count = 0,
.noise_error_count = 0,
.frame_error_count = 0,
.overrun_error_count = 0,
.dma_transfer_error_count = 0,
.receiver_timeout_error_count = 0,
.handler_buffer_full_error_count = 0,
}