Question: Bidirectional communication is enabled on the SPI bus with the SCLK idling low, data latched in on the rising edge of the clock, MSB transmitted

Bidirectional communication is enabled on the SPI bus with the SCLK idling low, data latched in on the rising edge of the clock, MSB transmitted first, the SS pin is manually controlled, and interrupts are
disabled.
a. What are the values of the SPIxCR1 and SPIxCR2 for the settings defined above?
b. Provide two settings for the SPIxBR register for a 3.125 MHz Baud rate when the system clock is
25 MHz.
c. Provide the code (in C) to initialize SPI2 at these setting with the interrupts disabled.
d. Write a function putByteSPI2 to transmit a single character on SPI2 and another function
putArraySPI2 to send a string of characters. Use polling to see if SPI2 is ready for transmission
and a blocking routine is okay for this exercise.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!