Name: Atharva Nandanwar
This repository contains source files for Principles of Embedded Software Project 5 - UART and Circular Buffer
Source Folder:
-
main.c/h - main subroutine
-
circular_buffer/circular_buffer.c/h - functions and structure definition for circular buffer
-
led_control/led_control.c/h - functions to control LED
-
logger/logger.c/h - functions to do logging
-
logger/errno.c/h - error handling routines
-
logger/timestamp.c/h - timestamp functionality
-
test/test.c/h - test cases and test subroutine
-
uart/uart.c/h - uart subroutines, initialization, and operation drivers
-
uctest - uCunit testing files
-
common.h - common include file for system-wide implementation
Observations:
-
There was serious problems with how integration would work in this aspect. How do I interface interrupt service routines with circular buffer operations? How do I interface UART functions with circular buffer? How do I manage getchar and putchar functionality with everything in the system? *Making global buffers was the way to do
-
The way I had designed logger required me to implement a lot of complicated printf operations. I rather used sprintf to format data into a string and printing the string directly.
-
During Interrupt based Application Mode, the program switches to Overrun condition, but it doesn't raise the interrupt. I did not address this problem in this program.
Installation/Execution Notes:
Use basic options to compile RUN, LOG, and TEST builds from Build Targets.
Compiler - gcc-arm-none-eabi
There are different functionalities that can be configured in RUN and LOG mode:
-
UART Non-blocking Echo Mode - #define ECHO_POLLING
-
UART Non-blocking Application Mode - #define APP_POLLING
-
UART Interrupts Echo Mode - #define ECHO_IRQN
-
UART Interrupts Application Mode - #define APP_IRQN
You will have to go to common.h to edit different modes. Comment out the mode you want, and comment others.
Note:
In application mode, report is printed after every 50th character is received.