15 #include "stm32l4xx_hal.h" 16 #include "stm32l476g_discovery.h" 20 #include "stm32l476g_discovery_glass_lcd.h" 55 sprintf(err_str,
"ERR %2d", errorcode);
56 BSP_LCD_GLASS_DisplayString((uint8_t*)err_str);
74 if(index == 2) error =
"SAMPLE_OVERRUN";
75 else if(index == 3) error =
"MEMORY_ALLOCATION_ERROR";
76 else if(index == 4) error =
"DAC_CONFIG_ERROR";
77 else if(index == 5) error =
"ADC_CONFIG_ERROR";
78 else if(index == 6) error =
"SETBLOCKSIZE_ERROR";
79 else if(index == 7) error =
"INVALID_MIC_SAMPLE_RATE";
80 else if(index == 8) error =
"CLOCK_CONFIG_ERROR";
81 else if(index == 13) error =
"DEBUG_ERROR";
82 else error =
"UNKNOWN";
84 printf(
"\n*** ERROR %d ***: %s\n",index, error);
void initerror()
Initialization routine to set up error buffers.
Num_Channels_In
Number of input audio channels.
int erroridx
Index of the NEXT error to be written into the errorbuf array.
void flagerror(int errorcode)
Records and indicates an error condition.
enum Num_Channels_Out Output_Configuration
int errorbuf[ERRORBUFLEN]
Circular buffer to store the most recent error codes.
Error Handling for ECE 486 STM32L476G-Discovery Interface.
STM32L476-Discovery configuration routines to support ECE 486.
#define ERROR_LED
Red LED, STM32L476G-Discovery.
#define ERRORBUFLEN
Number of errors to record in a circular buffer.
enum Num_Channels_In Input_Configuration
Num_Channels_Out
Number of output audio channels.
static void print_error(int index)