Answered step by step
Verified Expert Solution
Question
1 Approved Answer
TM4C123 Datasheet here: http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf QUESTIONS Assume all registers are reset to 0 before initialization Preserve unused register bits (unless you explain why they don't need
TM4C123 Datasheet here: http://www.ti.com/lit/ds/symlink/tm4c123gh6pm.pdf
QUESTIONS Assume all registers are reset to 0 before initialization Preserve unused register bits (unless you explain why they don't need to be preserved, or the - code provided does not preserve them). r Numbers used in code must be in hex, binary or decimal format. Do not use M rmat values. Pay attention to the format of numbers given in code. 1. 120 pts] UART a) Complete the following lines of code to initialize the GPIO module for UART4 for both transmit and receive operation. (10 pts) void UART_init (void) SYSCTI_ RCGCGPIO_R I GPIO PORTC DEN R I GPIO PORTC_DIR R GPIO PORTC AFSEL R GPIO PORTC PCTL R // Other initialization code not shown b) Write a single line of code to set the frame format for UART4 to 7 data bits, 1 stop bit, even parity, and FIFO mode. (5 pts) c) Assuming interrupts are enabled, write a single line of code for the interrupt handler to check whether an interrupt occurred due to a character being received. (5 pts) 4 QUESTIONS Assume all registers are reset to 0 before initialization Preserve unused register bits (unless you explain why they don't need to be preserved, or the - code provided does not preserve them). r Numbers used in code must be in hex, binary or decimal format. Do not use M rmat values. Pay attention to the format of numbers given in code. 1. 120 pts] UART a) Complete the following lines of code to initialize the GPIO module for UART4 for both transmit and receive operation. (10 pts) void UART_init (void) SYSCTI_ RCGCGPIO_R I GPIO PORTC DEN R I GPIO PORTC_DIR R GPIO PORTC AFSEL R GPIO PORTC PCTL R // Other initialization code not shown b) Write a single line of code to set the frame format for UART4 to 7 data bits, 1 stop bit, even parity, and FIFO mode. (5 pts) c) Assuming interrupts are enabled, write a single line of code for the interrupt handler to check whether an interrupt occurred due to a character being received. (5 pts) 4Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started