EE334_HW05_23F

docx

School

Minnesota State University, Mankato *

*We aren’t endorsed by this school

Course

334

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

docx

Pages

1

Uploaded by ChiefFang6521

Report
EE334 HW5 2023 Fall Due: 11/27/2023 (Monday) Save your HW using the filename “ EE334_HW05_LastName_FirstName and email to me. 1. Write a sequence of C statements to associate the USART1_RX to DMA1 channel 4 and enable it to perform DMA transfer. The received data (from the USART1->RDR register) will be stored in the input buffer inBuf1[40]. When 25 bytes are received and saved in inBuf1, stop the DMA. 2. Write a sequence of statements to associate the USART1_TX to DMA1 channel 5 and enable it to perform DMA transfer. The data to be written into the USART1->TDR register are stored in the array outBuf1[50]. DMA stops when 40 characters have been transferred to the USART1->TDR register. 3. If we want to set the USART baud rate to 38400 and 66800 for transmission and reception using oversampling by 16 & oversampling by 8, what value should be written into the USARTx->BRR register , respectively, assuming that f CK = 48 MHz ? Show your calculation. 4. Write an interrupt-driven version of getsUSART1 function for USART1 module. 5. Write a C function that reads in 4 hexadecimal digits (each digit is represented as an ASCII code) from the USART1 module and returns its binary value to the caller.
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help